+ b.SetToggle(True)
+ b.SetInitialSize()
+ sizer.Add(b)
+
+ # A bitmap button with text.
+ b = buttons.GenBitmapTextButton(self, -1, None, "Bitmapped Text", size = (200, 45))
+ 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)
+ b.SetUseFocusIndicator(False)
+ 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")
+
+
+ border = wx.BoxSizer(wx.VERTICAL)
+ border.Add(sizer, 0, wx.ALL, 25)
+ self.SetSizer(border)