[Gtk-sharp-list] Change widget background image
gigi gogu
dantes_programmer at yahoo.com
Fri Jan 13 19:18:17 EST 2006
Hy there.
I would like to change an widget background image in gtk. What is the best way of doing that?
I tried to change a window background using this code:
Gdk.Pixbuf image = new Gdk.Pixbuf( "fundal1.jpg" );
Gdk.Pixmap pixmap, pixmap_mask;
image.RenderPixmapAndMask( out pixmap, out pixmap_mask, 255 );
frm_Main.Style.SetBgPixmap(StateType.Normal,pixmap );
It worked both in Linux and windows, but it also changes the backgrounds on all other windows/dialogs. Strange (bug) huh?
Anyway, i guess the correct way to change the background is another, so please help me if you can by providing me with an example in how to change it on a window or a widget, as easy as in windows.forms.
I'm using mono 1.1.13 with gtk2.4
Dantes.
---------------------------------
Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands ASAP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20060113/098fd1b2/attachment.html
More information about the Gtk-sharp-list
mailing list