X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/261357eb0ad855b642fe68a84c9ad2b727a926cb..29131e8a54a8bb08ce6ea0bdb0d4093c20aebf68:/samples/widgets/toggle.cpp diff --git a/samples/widgets/toggle.cpp b/samples/widgets/toggle.cpp index 214474f7ad..6c4734d7ab 100644 --- a/samples/widgets/toggle.cpp +++ b/samples/widgets/toggle.cpp @@ -64,6 +64,9 @@ public: virtual wxControl *GetWidget() const { return m_toggle; } virtual void RecreateWidget() { CreateToggle(); } + // lazy creation of the content + virtual void CreateContent(); + protected: // event handlers void OnButtonReset(wxCommandEvent& event); @@ -116,6 +119,10 @@ IMPLEMENT_WIDGETS_PAGE(ToggleWidgetsPage, wxT("ToggleButton"), ToggleWidgetsPage::ToggleWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist) :WidgetsPage(book, imaglist, toggle_xpm) +{ +} + +void ToggleWidgetsPage::CreateContent() { wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);