[Gtk-sharp-list] Background Coloring: Tables, HBoxes, VBoxes

Michael Hutchinson m.j.hutchinson at gmail.com
Mon Apr 17 08:48:56 EDT 2006

On 4/17/06, Graham Oneale <graham at resonline.com.au> wrote:
> Still waiting for a reply on this,
> Hope somebody can help.

Did this
and this
not answer your question?

Anything that simply lays out widgets, e.g. VBox, Table etc, does not
draw a background. What appears as the background is whatever you
placed it inside. This is efficient and helps to make windows

Widgets generally do not draw more than they need to. For example, a
Button will draw the button itself, but any surrounding padding will
be whatever results from drawing it on top of  its parent widget. That
parent's 'background' may be drawn by itself, or its parent etc,
depending on the type of widget. The label placed inside the button
itelf will take its background from the Button.

An EventBox will draw a background (and catch clicks), so you can
place a widget inside one of those if you absolutely need to change
the background colour. However, there will be a (very small)
performance cost.


More information about the Gtk-sharp-list mailing list