|
|
| Author |
Message |
|
|
p_vamseekrishna
Joined: 29 Apr 2008 Posts: 2
|
Posted: Tue Apr 29, 2008 1:59 pm Post subject: gtk_image_set_from_file not working sometimes |
|
|
Hi All,
I am using the following function to set the image to a Widget
gtk_image_set_from_file();
Sometimes this function is updating the image but sometimes it is not at all displaying the image but still it is not crashing i.e. (rest of the code flow is working fine). Any idea on this will help.
Thanks in advance.
Vamsee. |
|
| Back to top |
|
 |
Micah Carrick Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 407 Location: Portland, OR USA
|
Posted: Tue Apr 29, 2008 2:12 pm Post subject: |
|
|
From the API...
| Quote: | Creates a new GtkImage displaying the file filename. If the file isn't found or can't be loaded, the resulting GtkImage will display a "broken image" icon. This function never returns NULL, it always returns a valid GtkImage widget.
If you need to detect failures to load the file, use gdk_pixbuf_new_from_file() to load the file yourself, then create the GtkImage from the pixbuf. (Or for animations, use gdk_pixbuf_animation_new_from_file()). |
|
|
| Back to top |
|
 |
p_vamseekrishna
Joined: 29 Apr 2008 Posts: 2
|
Posted: Wed Apr 30, 2008 5:05 am Post subject: |
|
|
Thanks for the information
I am getting the image on the widget. Now I am trying for upon clicking one button I need to change the other buttons image for this i am facing the same problem.
Thnaks,
Vamsee |
|
| Back to top |
|
 |
|