Re: Widget Colors



John Cupitt <john cupitt ng-london org uk> writes:

> philippe vivarelli conexant com wrote:
> > It works for buttons but not for other widgets (Label, Frames, ..)
> 
> Hi Phillippe, it works for widget that have their own windows.
> Label/frame/etc. are client-type widgets ... they draw on their parent's
> window. Wrap them in an event box to make sure they get their own
> window.

A slightly more intuitive way to think of this is that a widget such
as a Label or a Frame does not have a background - it draws the text,
and for the frame, the shadow, but not the background.
 
If you think about a label widget as just being the text, and not text
+ background, it should be clear that you need to set the background
of the parent widget (or add a parent widget such as a GtkEventBox),
rather than setting the background of the widget itself.

Regards,
                                        Owen




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