]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GenericButtons.py
Don't decref if the interpreter is not initialized, (eg. it's in its
[wxWidgets.git] / wxPython / demo / GenericButtons.py
index beb8a5245112e845d6b41e5dddd596e7f976e628..f99c65e3e67b5a643ba8fbbd75cfbedcd7d3e58f 100644 (file)
@@ -44,7 +44,7 @@ class TestPanel(wx.Panel):
         b.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
         b.SetBezelWidth(5)
         ###b.SetBestSize()
-        b.SetSizeHints(wx.DefaultSize)
+        b.SetMinSize(wx.DefaultSize)
         b.SetBackgroundColour("Navy")
         b.SetForegroundColour(wx.WHITE)
         b.SetToolTipString("This is a BIG button...")
@@ -114,6 +114,22 @@ class TestPanel(wx.Panel):
         b.SetBestSize()
         sizer.Add(b)
 
+
+        # a flat text button
+        b = buttons.GenButton(self, -1, 'Flat buttons too!', style=wx.BORDER_NONE)
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+        sizer.Add(b, flag=wx.ALIGN_CENTER_VERTICAL)
+
+        # A flat image button
+        bmp = images.getTest2Bitmap()
+        bmp.SetMaskColour("blue")
+        b = buttons.GenBitmapButton(self, -1, bmp, style=wx.BORDER_NONE)
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+        sizer.Add(b)
+        ##b.SetBackgroundColour("sky blue")
+        ##b.SetBackgroundColour("pink")
+
+
         border = wx.BoxSizer(wx.VERTICAL)
         border.Add(sizer, 0, wx.ALL, 25)
         self.SetSizer(border)