]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GenericButtons.py
warning fix
[wxWidgets.git] / wxPython / demo / GenericButtons.py
index bbbb6d8c020f9f6efbaf99fd78f624b9037de7ce..7bbe9d57042f2fc43f3282edec41f6642828f0d6 100644 (file)
@@ -10,6 +10,7 @@ class TestPanel(wx.Panel):
     def __init__(self, parent, log):
         wx.Panel.__init__(self, parent, -1)
         self.log = log
     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)
 
 
         sizer = wx.FlexGridSizer(1, 3, 20, 20)
 
@@ -43,6 +44,7 @@ class TestPanel(wx.Panel):
         b.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
         b.SetBezelWidth(5)
         ###b.SetBestSize()
         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...")
         b.SetBackgroundColour("Navy")
         b.SetForegroundColour(wx.WHITE)
         b.SetToolTipString("This is a BIG button...")
@@ -67,11 +69,11 @@ class TestPanel(wx.Panel):
         b = buttons.GenBitmapButton(self, -1, None)
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
         bmp = images.getBulb1Bitmap()
         b = buttons.GenBitmapButton(self, -1, None)
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
         bmp = images.getBulb1Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetBestSize()
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetBestSize()
@@ -86,11 +88,11 @@ class TestPanel(wx.Panel):
         b = buttons.GenBitmapToggleButton(self, -1, None)
         self.Bind(wx.EVT_BUTTON, self.OnToggleButton, b)
         bmp = images.getBulb1Bitmap()
         b = buttons.GenBitmapToggleButton(self, -1, None)
         self.Bind(wx.EVT_BUTTON, self.OnToggleButton, b)
         bmp = images.getBulb1Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetToggle(True)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetToggle(True)
@@ -101,11 +103,11 @@ class TestPanel(wx.Panel):
         b = buttons.GenBitmapTextButton(self, -1, None, "Bitmapped Text", size = (200, 45))
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
         bmp = images.getBulb1Bitmap()
         b = buttons.GenBitmapTextButton(self, -1, None, "Bitmapped Text", size = (200, 45))
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
         bmp = images.getBulb1Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
         bmp.SetMask(mask)
         b.SetBitmapLabel(bmp)
         bmp = images.getBulb2Bitmap()
-        mask = wx.MaskColour(bmp, wx.BLUE)
+        mask = wx.Mask(bmp, wx.BLUE)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetUseFocusIndicator(False)
         bmp.SetMask(mask)
         b.SetBitmapSelected(bmp)
         b.SetUseFocusIndicator(False)
@@ -151,5 +153,5 @@ overview = buttons.__doc__
 if __name__ == '__main__':
     import sys,os
     import run
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])