]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/radiobox.cpp
fixed incorrectly reported WXWIN_COMPATIBILITY_2_6 value in summary
[wxWidgets.git] / samples / widgets / radiobox.cpp
index 9f647fd92eb0eb6f14b8a2851093232370a97c1a..d0729c6f10c85e9c7be567a14a492f0c47d29b11 100644 (file)
@@ -89,6 +89,9 @@ public:
     virtual wxControl *GetWidget() const { return m_radio; }
     virtual void RecreateWidget() { CreateRadio(); }
 
+    // lazy creation of the content
+    virtual void CreateContent();
+
 protected:
     // event handlers
     void OnCheckOrRadioBox(wxCommandEvent& event);
@@ -199,7 +202,10 @@ RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
     m_radio =
     m_radioDir = (wxRadioBox *)NULL;
     m_sizerRadio = (wxSizer *)NULL;
+}
 
+void RadioWidgetsPage::CreateContent()
+{
     wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
 
     // left pane
@@ -296,8 +302,6 @@ RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
 
     // final initializations
     SetSizer(sizerTop);
-
-    sizerTop->Fit(this);
 }
 
 // ----------------------------------------------------------------------------