about colors (and thanks)
Joan .
tontudelbot at gmail.com
Wed Jul 12 15:20:03 PDT 2006
here comes:
Traceback (most recent call last):
File "/home/johan/Desktop/2.py", line 97, in casellesevent
caselles(cass)
File "/home/johan/Desktop/2.py", line 27, in __init__
casella.SetColors(self, wx.Colour(0,0,0))
File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/lib/intctrl.py",
line 705, in SetColors
self._colorValue()
File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/lib/intctrl.py",
line 724, in _colorValue
self.SetForegroundColour(self.__default_color)
File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py",
line 9524, in SetForegroundColour
return _core_.Window_SetForegroundColour(*args, **kwargs)
TypeError: Expected a wxColour object or a string containing a colour
name or '#RRGGBB'.
I tried using a string with name color or hex values too...
2006/7/13, Robin Dunn <robin at alldunn.com>:
> 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!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
More information about the wxpython-users
mailing list