GtkTreeView and pixbuf renderer
- From: Peter Zelezny <pzel dodo com au>
- To: gtk-app-devel-list gnome org
- Subject: GtkTreeView and pixbuf renderer
- Date: Fri, 12 Apr 2002 16:30:37 +1000
Hi All,
Could someone give me a little help with GtkTreeView? I'm trying to create
a column of pixbufs, but somehow it's not working. This is roughly what I have:
static GdkPixbuf *pix_op;
...
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-1, "Icon", renderer,
"pixbuf", COLUMN_ICON,
NULL);
...
/* adding some rows */
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
COLUMN_ICON, pix_op,
COLUMN_NICK, "nickname",
COLUMN_HOST, "user host com",
-1);
I know the "pix_op" is valid, because I can render it manually. No pixbuf is
shown in the column, and I get this warning:
(ulist:2704): GLib-GObject-WARNING **: unable to set property `pixbuf' of type `GdkPixbuf' from value of type
`gpointer'
The other columns (text ones) are working just fine. What could the problem be?
--
Peter Zelezny. <pzel dodo com au>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]