+ ###b.SetBestSize()
+ b.SetMinSize(wx.DefaultSize)
+ b.SetBackgroundColour("Navy")
+ b.SetForegroundColour(wx.WHITE)
+ b.SetToolTipString("This is a BIG button...")
+ # let the sizer set best size
+ sizer.Add(b, flag=wx.ADJUST_MINSIZE)
+
+ # An image button
+ bmp = images.getTest2Bitmap()
+ b = buttons.GenBitmapButton(self, -1, bmp)
+ self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+ sizer.Add(b)
+
+ # An image button, disabled.
+ bmp = images.getTest2Bitmap()
+ b = buttons.GenBitmapButton(self, -1, bmp)
+ self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+ sizer.Add(b)
+ b.Enable(False)
+
+ # An image button, using a mask to get rid of the
+ # undesireable part of the image
+ b = buttons.GenBitmapButton(self, -1, None)
+ self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+ bmp = images.getBulb1Bitmap()
+ mask = wx.Mask(bmp, wx.BLUE)
+ bmp.SetMask(mask)
+ b.SetBitmapLabel(bmp)
+ bmp = images.getBulb2Bitmap()
+ mask = wx.Mask(bmp, wx.BLUE)
+ bmp.SetMask(mask)
+ b.SetBitmapSelected(bmp)