Re: Setting Widget Attributes (Half Solution)




"Ben R. Boule" <bboule@xylogics.com> writes:

> Ok, Yesterday I asked setting widget attributes, specifically foreground 
> color, background color, and font.  Someone gave me a snipped on how to 
> set the fonts, but no one said anything about colors.  
> 
> I managed to use GtkStyle to change the foreground color, but it doesn't 
> work for the background color.  I'm working with a GtkLabel for, so I'm 
> wondering if a GtkLabel is perhaps transparent, so that it's letting the 
> background of the container show through.

Yes, the label is transparent. It normally just draws on top
of whatever was there before. When it needs to clear itself
(when, for instance, the text in the label changes), it
does a gdk_window_clear_area() on its parent's window, so
it will be cleared in the parent widget's background color.

You'll need to set the background for the parent, not for the
Label itself.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]