On Mon, Jan 11, 2010 at 8:32 AM, dkarantonis <[email protected]> wrote: > dkarantonis wrote: >> >> Hi to all, >> >> i was wondering whether i could assign a background image to a gtk# widget >> (actually a tab or a window), instead of just modifying its background >> color (using ModifyBG()). >> >> thanks in advance, >> Dimitris >> > > Actually, my problem is that i would like to use a function like > SetBackPixmap() that is available on gdk windows, but it is not available on > gtk widgets.
Many widgets (e.g. containers, label) don't have a GdkWindow, and/or do they render their own background. Hence modifying the bg colour on the style won't actually have any effect on such widgets. If the widgets don't have GdkWindows, you can put the widget in an EventBox, which is simply a container that has no padding or border, but has a GdkWindow so can catch events and draw its own background. -- Michael Hutchinson http://mjhutchinson.com _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
