]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/toggle.cpp
use WXSIZEOF() instead of hardcoded numbers of points in the arrays
[wxWidgets.git] / samples / widgets / toggle.cpp
index 214474f7ade23e565e24397ee4e3b6764f905119..6c4734d7ab15c0e6c1da25041194d2ed2941d048 100644 (file)
@@ -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);