/*! \brief Enumerate the control's properties. * * \param flags long The control flags. * \return void * */ void wxsTreeCtrl::OnEnumWidgetProperties(cb_unused long Flags) { static wxString sImageNames[128]; static const wxChar *pImageNames[128]; int i, n; wxString ss, tt; wxArrayString aa; // find available image lists and store them in our local static arrays FindAllImageLists(aa); n = aa.GetCount(); if(n > 127) { n = 127; } for(i = 0; i < n; i++) { ss = aa.Item(i); sImageNames[i] = ss; pImageNames[i] = (const wxChar *) sImageNames[i]; } pImageNames[n] = NULL; WXS_EDITENUM(wxsTreeCtrl, m_sImageList, _("Image List"), _T("image_list"), pImageNames, _("<none>")) // The list of items to appear in the tree. UpdateTreeItemList(); WXS_IMAGETREE(wxsTreeCtrl, m_arrItems, _("Tree Items"), wxT("tree_items")); WXS_ARRAYSTRING(wxsTreeCtrl, m_arrItems, _("Items as Text"), wxT("items_text"), _("item2")); WXS_BOOL(wxsTreeCtrl, m_bExpand, _("Expand All"), _("expand_all"), false); }
void wxsBitmapComboBox::OnEnumWidgetProperties(long Flags) { static wxString sImageNames[128]; static const wxChar *pImageNames[128]; int i,n; wxString ss, tt; wxArrayString aa; // find available image lists and store them in our local static arrays FindAllImageLists(aa); n = aa.GetCount(); if (n > 127) n = 127; for(i=0; i<n; i++) { ss = aa.Item(i); sImageNames[i] = ss; pImageNames[i] = (const wxChar *) sImageNames[i]; }; pImageNames[n] = NULL; WXS_EDITENUM(wxsBitmapComboBox, mImageList, _("Image List"), _("mImageList"), pImageNames, _("<none>")) // the list of items to appear in the combo box UpdateComboItemList(); WXS_IMAGECOMBO(wxsBitmapComboBox, mItems, _("Combo Items"), _("mItems")); WXS_ARRAYSTRING(wxsBitmapComboBox, mItems, _("Items as Text"), _("mItemsText"), _("item2")); }