Re: how to load an image ?



Dana utorak 3. februar 2004. 15:04, Manoj tr je napisao/la:
Hi,
When i designed my project using glade, i've included a default image,
so it's fixed in my interface.c file. How can i do to load another one
instead of the default one without editing my interface.c file ?
Thanks for your help,

Chris

Use  GtkWidget*  gtk_image_new_from_file(const gchar *filename);

and add this widget to its parrent

Manoj

Use glade's support function look_widget (prototype is in support.h) that you 
can call from your callback to get pointer on GtkEidget dtat displays image. 
Than, use apropriate function to assign new image from file to that widget.

Goran




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