]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/static.cpp
Don't cast with G_OBJECT when passing a GObject to g_object_ref, g_object_unref and...
[wxWidgets.git] / samples / widgets / static.cpp
index 0b401aabbf8115bec835fbc6506ae61b4d663047..499a0037b6e7e24b2670d878071fe450543ec9fd 100644 (file)
@@ -139,10 +139,11 @@ END_EVENT_TABLE()
 class StaticWidgetsPage : public WidgetsPage
 {
 public:
-    StaticWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+    StaticWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
     virtual ~StaticWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_statText; }
+    virtual void RecreateWidget() { CreateStatic(); }
 
 protected:
     // event handlers
@@ -205,9 +206,9 @@ END_EVENT_TABLE()
 
 IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"));
 
-StaticWidgetsPage::StaticWidgetsPage(wxNotebook *notebook,
-                                       wxImageList *imaglist)
-                  : WidgetsPage(notebook)
+StaticWidgetsPage::StaticWidgetsPage(wxBookCtrlBase *book,
+                                     wxImageList *imaglist)
+                  : WidgetsPage(book)
 {
     imaglist->Add(wxBitmap(statbox_xpm));
 
@@ -333,7 +334,7 @@ void StaticWidgetsPage::CreateStatic()
     }
 
     int flagsBox = 0,
-        flagsText = 0;
+        flagsText = ms_defaultFlags;
 
     if ( !m_chkAutoResize->GetValue() )
     {