]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/button.cpp
Don't cast with G_OBJECT when passing a GObject to g_object_ref, g_object_unref and...
[wxWidgets.git] / samples / widgets / button.cpp
index 4a17b65be1d21ad794c65e1eefb4d0edc302a05c..8e855553a3d63589cc334085d649d9f55f81403c 100644 (file)
@@ -83,6 +83,7 @@ public:
     virtual ~ButtonWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_button; }
+    virtual void RecreateWidget() { CreateButton(); }
 
 protected:
     // event handlers
@@ -311,7 +312,7 @@ void ButtonWidgetsPage::CreateButton()
         label = m_textLabel->GetValue();
     }
 
-    int flags = 0;
+    int flags = ms_defaultFlags;
     switch ( m_radioHAlign->GetSelection() )
     {
         case ButtonHAlign_Left:
@@ -341,7 +342,7 @@ void ButtonWidgetsPage::CreateButton()
             // fall through
 
         case ButtonVAlign_Centre:
-            flags |= wxALIGN_CENTRE_VERTICAL;
+            // centre vertical alignment is the default (no style)
             break;
 
         case ButtonVAlign_Bottom: