self.SetColour(colour)
def SetColour(self, colour):
- if type(colour) == type( () ):
- colour = wxColour(*colour)
+ if type(colour) == tuple:
+ colour = wx.Colour(*colour)
+ if type(colour) == str:
+ colour = wx.NamedColour(colour)
self.colour = colour
bmp = self.MakeBitmap()
bmp = wx.EmptyBitmap(width-bdr, height-bdr)
dc = wx.MemoryDC()
dc.SelectObject(bmp)
+ dc.SetFont(self.GetFont())
label = self.GetLabel()
# Just make a little colored bitmap
dc.SetBackground(wx.Brush(self.colour))