[Gtk-sharp-list] Gtk# Image question
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
> > to make it insert an image in place of the text label. So I was trying
> > use Gtk.Image("filename.jpg") which both compiles and runs but displays
> > image. I am using monodevelop... where is it looking for this image? Do
> > 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
> 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...
More information about the Gtk-sharp-list