[Glade-users] gtk_image......... Change image on existing window



Displays the image on the window no problems...Now I want to change the
image from a new file.
In a button click event I try:

image1 = gtk_image_new_from_file("copy.bmp");
gtk_widget_show (image1);
...............No sign of any new image.



In your click event use:

gtk_image_set_from_file(image1, "copy.bmp");

where "image1" is a pointer to the same object you  declared when you built
the window.


-- 
Bye,
 Gabry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20090714/4386bd93/attachment.html 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]