X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c33d35d3749e74bde2eb00faefbe3f5dc7e4aa..9e15c94f41c8cdf42470d318269e48e90d6ba75e:/samples/widgets/listbox.cpp diff --git a/samples/widgets/listbox.cpp b/samples/widgets/listbox.cpp index 1bbd3faa46..b189d3b22b 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