[Gtk-sharp-list] Displaying an image
Mon, 14 Feb 2005 22:02:17 -0600
On Mon, 2005-02-14 at 16:56 +0100, Vincent Arnoux wrote:
>I am trying to have an image displayed in a Gtk.Image component (from a
>snapshot) but I can't get it to work. I declared my Gtk.Image in my
>gui.glade and tried to assign from the following code.
>This application is pretty urgent for me, so I will take any idea from you.
Try adding your image to your resources (mcs -resource:/path/image.png,image.png) and then invoking it:
This sample works if you added an image called image.png AND it doesn't
need the image-file, because you're reading the assembly.
image1.Pixbuf = Gdk.Pixbuf.LoadFromResource("image.png");
GPG. 8234 549C C1D8 3278 25CF 1D53 A0B6 EECB EEB0 0B26