[Gtk-sharp-list] Gtk# Image question

Michael Beattie mtbeedee at gmail.com
Sun Sep 18 08:25:44 EDT 2011

2011/9/18 Jacek Rużyczka <stacheldraht at interia.pl>

> Am Sonntag 18 September 2011, 04:45:01 schrieb mbeattie:
> > I was following a tutorial for some HelloWorld thing and was wondering
> how
> > to make it insert an image in place of the text label.  So I was trying
> to
> > use Gtk.Image("filename.jpg") which both compiles and runs but displays
> no
> > image.  I am using monodevelop... where is it looking for this image?  Do
> I
> > need to import it into the "solution" somewhere?
> >
> Yes, you need to import the image as a resource into your solution. To do
> this, open the "Stock icons" node in the solution tree and define a new
> icon
> using your image file.
> I am still missing something... Even when it is there I can't reference it
by file name.  I also tried by the "icon name" in that dialog box and it
gave me an error about being invalid in that context.  I also tried
LoadFromResource and that failed.  Same with NewFromIconName.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20110918/58884ffe/attachment.html 

More information about the Gtk-sharp-list mailing list