Big fixes. Can now use colour names, and exports the event type to
the old namespace git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,8 +86,10 @@ class ColourSelect(wx.BitmapButton):
|
||||
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()
|
||||
|
Reference in New Issue
Block a user