GtkCellRendererPixbuf question.



Hi all,
  I wanted to have some images on the tree nodes. I
created my column like

GtkCellRenderer *renderer_image;
column = gtk_tree_view_column_new();
gtk_tree_view_column_pack_start(column,renderer_image,FALSE);
gtk_tree_view_column_add_attribute(column,
                                   renderer_image,
                                   "pixbuf",0);

I wanted to create root node like,

GdkPixbuf *pb;
gtk_tree_store_append (GTK_TREE_STORE (model), &iter,
NULL);
pb = get_pixbuf("play.xpm");
gtk_tree_store_set(GTK_TREE_STORE (model),&iter,
                                0,pb,-1);

But I get like 

GLib-GObject-WARNING **: unable to set property
`pixbuf' of type `GdkPixbuf' from value of type
`gchararray'

Can anybody help me to solve the problem....

Is there any example of using images in TreeStore


Deekshit M



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