]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GenericButtons.py
moved vararg CRT functions wrappers to a new wxcrtvararg.h header
[wxWidgets.git] / wxPython / demo / GenericButtons.py
index c9972a82a423d7cff97fc2c51e16759ab998e5ff..a142d5c2342dc260b714d8a6dd608d4ebc0ecb53 100644 (file)
@@ -10,6 +10,7 @@ class TestPanel(wx.Panel):
     def __init__(self, parent, log):
         wx.Panel.__init__(self, parent, -1)
         self.log = log
+        ##self.SetBackgroundColour("sky blue")
 
         sizer = wx.FlexGridSizer(1, 3, 20, 20)
 
@@ -42,7 +43,7 @@ class TestPanel(wx.Panel):
         self.Bind(wx.EVT_BUTTON, self.OnBiggerButton, b)
         b.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
         b.SetBezelWidth(5)
-        ###b.SetBestSize()
+        b.SetMinSize(wx.DefaultSize)
         b.SetBackgroundColour("Navy")
         b.SetForegroundColour(wx.WHITE)
         b.SetToolTipString("This is a BIG button...")
@@ -74,7 +75,7 @@ class TestPanel(wx.Panel):
         mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
-        b.SetBestSize()
+        b.SetInitialSize()
         sizer.Add(b)
 
         # A toggle button
@@ -94,7 +95,7 @@ class TestPanel(wx.Panel):
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetToggle(True)
-        b.SetBestSize()
+        b.SetInitialSize()
         sizer.Add(b)
 
         # A bitmap button with text.
@@ -109,9 +110,29 @@ class TestPanel(wx.Panel):
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetUseFocusIndicator(False)
-        b.SetBestSize()
+        b.SetInitialSize()
         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")
+
+        b = buttons.ThemedGenButton(self, -1, 'Drawn with native renderer')
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+        sizer.Add(b)
+        
+
         border = wx.BoxSizer(wx.VERTICAL)
         border.Add(sizer, 0, wx.ALL, 25)
         self.SetSizer(border)