There isn't a style.red attribute.  To create the colour red in the
colormap used by the widget, use one of the following:
  red = widget.get_colormap().alloc('red')
  red = widget.get_colormap().alloc('#ff0000')
  red = widget.get_colormap().alloc(0xffff, 0, 0)

All these forms are equivalent (the last is a little bit faster, but the
first allows the system administrator to redefine red to something else in
/usr/lib/X11/rgb.txt :)

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Thu, 2 Mar 2000, Javi Roman wrote:

> I have:
> 
>       ...
>       style = self.window.get_style ().copy ()
>         style.bg[STATE_NORMAL] = style.black
>         self.window.set_style (style)
>         ...
> 
> This works correctly, but i want a red background color, and i try:
> 
>       ...
>       style.bg[STATE_NORMAL] = style.red
>       ...
> 
> This fail. I think that i don't understand very well. Can anybody help
> me?
> 
> 
> Regards.
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to