X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/261357eb0ad855b642fe68a84c9ad2b727a926cb..f21467d8ec6c42606f2e875a286909984722d4b6:/samples/widgets/slider.cpp diff --git a/samples/widgets/slider.cpp b/samples/widgets/slider.cpp index 4502d6c871..ec7b0bf604 100644 --- a/samples/widgets/slider.cpp +++ b/samples/widgets/slider.cpp @@ -95,6 +95,9 @@ public: virtual wxControl *GetWidget() const { return m_slider; } virtual void RecreateWidget() { CreateSlider(); } + // lazy creation of the content + virtual void CreateContent(); + protected: // event handlers void OnButtonReset(wxCommandEvent& event); @@ -223,7 +226,10 @@ SliderWidgetsPage::SliderWidgetsPage(WidgetsBookCtrl *book, m_slider = (wxSlider *)NULL; m_sizerSlider = (wxSizer *)NULL; +} +void SliderWidgetsPage::CreateContent() +{ wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL); // left pane