Re: Newbie: gtk_image_new_from_file help please.



Hi,

Douglas McIntosh <douglas a mcintosh lineone net> writes:

> My sample program I want to do nothing more than have a gnome file
> selector, a button and an image display area. The buttons selects a
> callback function which should update the image area with the selected
> image.
> 
> GtkWidget *image1;
> image1 = gtk_image_new_from_file(fileentered);
> 
> I expected this to automatically update the Image Area. But it does not
> seem to do so. There are no error message when compiling or running the
> program.

this function doesn't change the displayed image, it creates a new
GtkImage widget. You probably want to use gtk_image_set_from_file().


Salut, Sven



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