On Thu, 18 Jan 2001 [EMAIL PROTECTED] wrote:

> I'm trying to change the style of an entry in a CTree. I can change the font,
> but I'm having no luck with the colour.
> 
>       style.font = gtk.load_font(font)
>       style.fg[gtk.STATE_NORMAL] = gtk.GdkColor(fg[0], fg[1], fg[2])
>       style.bg[gtk.STATE_NORMAL] = gtk.GdkColor(bg[0], bg[1], bg[2])
> 
> The values in fg and bg range from 0..255; I got them out of a colour selector.
> The font is being correctly applied but the colours remain the defaults.
> 
> I've tried setting the colours directly, but if I do that I end up with black
> on black. Anyone know what's going on?

Colour values on X are 16 bit values.  So your colours would probably all
have been rounded to values very close to 0, which would explain the
black.

James.

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



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to