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

Thiago M. Sayão thiago.sayao at gmail.com
Mon Apr 17 21:08:52 EDT 2006


In another somewhat related question:

	What if i have a window with a RGBA color (semi translucent) and i want
to put a Gtk.TreeView inside it. I can draw with the RGBA color using
Mono.Cairo, but how to i make the Gtk.TreeView Gdk.Window follow the
parent window background (which is RGBA) ? I understand that both the
Gtk.Window and the Gtk.TreeView have their own Gdk.Window. It happens
that the ModifyBg function doesn't support RGBA, only RGB, with no
alpha.

Thanks in advance,
Thiago M. Sayão.



On Mon, 2006-04-17 at 13:48 +0100, Michael Hutchinson wrote:
> 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
> http://lists.ximian.com/pipermail/gtk-sharp-list/2006-March/007054.html
> and this
> http://lists.ximian.com/pipermail/gtk-sharp-list/2006-March/007055.html
> 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
> consistent.
> 
> 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.
> 
> 
> Michael
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list



More information about the Gtk-sharp-list mailing list