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:
Robin Dunn 2004-02-21 01:51:41 +00:00
parent 5ce61d9fd2
commit a27d1f42e2
2 changed files with 5 additions and 2 deletions

View File

@ -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()

View File

@ -9,3 +9,4 @@ __doc__ = wx.lib.colourselect.__doc__
ColourSelect = wx.lib.colourselect.ColourSelect
ColourSelectEvent = wx.lib.colourselect.ColourSelectEvent
EVT_COLOURSELECT = wx.lib.colourselect.EVT_COLOURSELECT
wxEVT_COMMAND_COLOURSELECT = wx.lib.colourselect.wxEVT_COMMAND_COLOURSELECT