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.
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to