]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/static.cpp
use WXDFB_FONTPATH variable instead of WXDFB_FONTDIR and search the dirs recursively...
[wxWidgets.git] / samples / widgets / static.cpp
index 05c13669092853523c59821707015315528d1710..c40d3bccc02e78f7a0f00f4205f5c87dbfdffc0e 100644 (file)
@@ -145,6 +145,9 @@ public:
     virtual wxControl *GetWidget() const { return m_statText; }
     virtual void RecreateWidget() { CreateStatic(); }
 
+    // lazy creation of the content
+    virtual void CreateContent();
+
 protected:
     // event handlers
     void OnCheckOrRadioBox(wxCommandEvent& event);
@@ -205,7 +208,7 @@ END_EVENT_TABLE()
 // ============================================================================
 
 IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"),
-                       (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+                       (int)wxPlatform(GENERIC_CTRLS).If(wxOS_WINDOWS,NATIVE_CTRLS)
                        );
 
 StaticWidgetsPage::StaticWidgetsPage(WidgetsBookCtrl *book,
@@ -227,7 +230,10 @@ StaticWidgetsPage::StaticWidgetsPage(WidgetsBookCtrl *book,
     m_staticBox = (wxStaticBox *)NULL;
     m_sizerStatBox = (wxStaticBoxSizer *)NULL;
     m_sizerStatic = (wxSizer *)NULL;
+}
 
+void StaticWidgetsPage::CreateContent()
+{
     wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
 
     // left pane
@@ -301,8 +307,6 @@ StaticWidgetsPage::StaticWidgetsPage(WidgetsBookCtrl *book,
     Reset();
 
     SetSizer(sizerTop);
-
-    sizerTop->Fit(this);
 }
 
 // ----------------------------------------------------------------------------