]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/listbox.cpp
Don't cast with G_OBJECT when passing a GObject to g_object_ref, g_object_unref and...
[wxWidgets.git] / samples / widgets / listbox.cpp
index 9c83a9a4677c5a7ca19459ced9c3a0702789663f..82db40460672d8c1fa8a09f1e1f40439a51a4e02 100644 (file)
@@ -76,9 +76,10 @@ enum
 class ListboxWidgetsPage : public WidgetsPage
 {
 public:
-    ListboxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
+    ListboxWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
 
     virtual wxControl *GetWidget() const { return m_lbox; }
+    virtual void RecreateWidget() { CreateLbox(); }
 
 protected:
     // event handlers
@@ -194,7 +195,7 @@ END_EVENT_TABLE()
 
 IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"));
 
-ListboxWidgetsPage::ListboxWidgetsPage(wxBookCtrl *book,
+ListboxWidgetsPage::ListboxWidgetsPage(wxBookCtrlBase *book,
                                        wxImageList *imaglist)
                   : WidgetsPage(book)
 {
@@ -334,7 +335,7 @@ void ListboxWidgetsPage::Reset()
 
 void ListboxWidgetsPage::CreateLbox()
 {
-    int flags = 0;
+    int flags = ms_defaultFlags;
     switch ( m_radioSelMode->GetSelection() )
     {
         default:
@@ -515,12 +516,12 @@ void ListboxWidgetsPage::OnListbox(wxCommandEvent& event)
 
 void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
 {
-    wxLogMessage( _T("Listbox item %ld double clicked"), event.GetInt() );
+    wxLogMessage( _T("Listbox item %d double clicked"), event.GetInt() );
 }
 
 void ListboxWidgetsPage::OnCheckListbox(wxCommandEvent& event)
 {
-    wxLogMessage( _T("Listbox item %ld toggled"), event.GetInt() );
+    wxLogMessage( _T("Listbox item %d toggled"), event.GetInt() );
 }
 
 void ListboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))