X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/261357eb0ad855b642fe68a84c9ad2b727a926cb..084ad0c2424aa998a640c151f8fa762435364449:/samples/widgets/button.cpp diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp index 7c4dd08266..c06a28bf69 100644 --- a/samples/widgets/button.cpp +++ b/samples/widgets/button.cpp @@ -85,6 +85,9 @@ public: virtual wxControl *GetWidget() const { return m_button; } virtual void RecreateWidget() { CreateButton(); } + // lazy creation of the content + virtual void CreateContent(); + protected: // event handlers void OnCheckOrRadioBox(wxCommandEvent& event); @@ -183,7 +186,10 @@ ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book, m_button = (wxButton *)NULL; m_sizerButton = (wxSizer *)NULL; +} +void ButtonWidgetsPage::CreateContent() +{ wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL); // left pane