X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c33d35d3749e74bde2eb00faefbe3f5dc7e4aa..950905affdfa9041316f82308e1a11e82c783070:/samples/widgets/listbox.cpp diff --git a/samples/widgets/listbox.cpp b/samples/widgets/listbox.cpp index 1bbd3faa46..a766ef441f 100644 --- a/samples/widgets/listbox.cpp +++ b/samples/widgets/listbox.cpp @@ -81,6 +81,9 @@ public: virtual wxControl *GetWidget() const { return m_lbox; } virtual void RecreateWidget() { CreateLbox(); } + // lazy creation of the content + virtual void CreateContent(); + protected: // event handlers void OnButtonReset(wxCommandEvent& event); @@ -145,7 +148,7 @@ protected: #ifdef __WXWINCE__ wxListBoxBase #else - wxListBox + wxListBox #endif *m_lbox; @@ -225,6 +228,10 @@ ListboxWidgetsPage::ListboxWidgetsPage(WidgetsBookCtrl *book, m_lbox = NULL; m_sizerLbox = (wxSizer *)NULL; +} + +void ListboxWidgetsPage::CreateContent() +{ /* What we create here is a frame having 3 panes: style pane is the leftmost one, in the middle the pane with buttons allowing to perform @@ -327,8 +334,6 @@ ListboxWidgetsPage::ListboxWidgetsPage(WidgetsBookCtrl *book, Reset(); SetSizer(sizerTop); - - sizerTop->Fit(this); } // ----------------------------------------------------------------------------