[wxPython-users] about colors (and thanks)
Robin Dunn
robin at alldunn.com
Wed Jul 12 15:07:46 PDT 2006
Joan . wrote:
>
> Now, my last problem: i did a function that changes the color of a
> IntCtrl. I use the method SetColors (casella.SetColors(self,
> wx.Colour(0, 0, 0))) raise a error:
>
> return _core_.Window_SetForegroundColour(*args, **kwargs)
> TypeError: Expected a wxColour object or a string containing a colour
> name or '#RRGGBB'.
It's usually more helpful to show some of the lines above the last one
in a traceback so we can know how it got to the point of the failure.
>
> I tried putting wx.Color('red') (or black, cause a variable changes
> this argument), and wx.Color('#000000')
> This is not the way to change the text color?
Using wx.Colour(0,0,0) should have worked. The other options it is
describing are to just pass a plain string with the colour name or the
hex rgb values.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list