]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/listbox.cpp
more wxFD_XXX renamings (patch 1488371)
[wxWidgets.git] / samples / widgets / listbox.cpp
index 0a40eb74e1959b96c10574fc56bf928176fd56a8..82e6021245bebede1edc338fea6425569ac1c60d 100644 (file)
@@ -55,7 +55,7 @@
 // control ids
 enum
 {
-    ListboxPage_Reset = 100,
+    ListboxPage_Reset = wxID_HIGHEST,
     ListboxPage_Add,
     ListboxPage_AddText,
     ListboxPage_AddSeveral,
@@ -142,7 +142,7 @@ protected:
                *m_chkOwnerDraw;
 
     // the listbox itself and the sizer it is in
-    wxListBox *m_lbox;
+    wxListBoxBase *m_lbox;
     wxSizer *m_sizerLbox;
 
     // the text entries for "Add/change string" and "Delete" buttons
@@ -193,17 +193,20 @@ END_EVENT_TABLE()
 // implementation
 // ============================================================================
 
+#if defined(__WXUNIVERSAL__)
+    #define FAMILY_CTRLS UNIVERSAL_CTRLS
+#else
+    #define FAMILY_CTRLS NATIVE_CTRLS
+#endif
+
 IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"),
-                       (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
-                       | WITH_ITEMS_CTRLS
+                       FAMILY_CTRLS | WITH_ITEMS_CTRLS
                        );
 
 ListboxWidgetsPage::ListboxWidgetsPage(WidgetsBookCtrl *book,
                                        wxImageList *imaglist)
-                  : WidgetsPage(book)
+                  : WidgetsPage(book, imaglist, listbox_xpm)
 {
-    imaglist->Add(wxBitmap(listbox_xpm));
-
     // init everything
     m_radioSelMode = (wxRadioBox *)NULL;
 
@@ -213,7 +216,7 @@ ListboxWidgetsPage::ListboxWidgetsPage(WidgetsBookCtrl *book,
     m_chkSort =
     m_chkOwnerDraw = (wxCheckBox *)NULL;
 
-    m_lbox = (wxListBox *)NULL;
+    m_lbox = (wxListBoxBase *)NULL;
     m_sizerLbox = (wxSizer *)NULL;
 
     /*