[Glade-users] show a argb data in a glade window

Tristan Van Berkom tvb at gnome.org
Mon Aug 20 11:07:26 EDT 2007


On Thu, 2007-08-16 at 14:00 +0100, amit bag wrote:
> Hi All,
>          I want to show a argb data in the glade window .I use a
> function which generate the argb data as its out put . I want to show
>  that data in the glade window .I use the function
> gdk_pixbuf_new_from_data to show the data in glade window .In the
> const guchar *data field I pass the data that generated by the
> function I am using .
>         GtkWidget *image1;
>         image1=(GtkWidget*)gdk_pixbuf_new_from_data("idata to be
> shown",GDK_COLORSPACE_RGB,FALSE,8,100,20,100*3,NULL,NULL);
>         gtk_widget_show_all(window1);
> But it show nothing .So please some one tell me with a example it's
> easy to me to understand how to display it .
> Thanks in advance .

A GdkPixbuf is not a GtkWidget.

You'll need to use a GtkImage in your glade project.

http://library.gnome.org/devel/gtk/unstable/GtkImage.html

Cheers,
                   -Tristan





More information about the Glade-users mailing list