]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/button.cpp
removed dll export declaration for wxCStrData: it's unneeded because the class is...
[wxWidgets.git] / samples / widgets / button.cpp
index 7c4dd08266772b523ebb9e58cb85ec108d818678..914fa1a08b347d7eb210c85dcb5ed7d41d34b660 100644 (file)
@@ -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
@@ -269,8 +275,6 @@ ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book,
     CreateButton();
 
     SetSizer(sizerTop);
-
-    sizerTop->Fit(this);
 }
 
 // ----------------------------------------------------------------------------