ERDI Gergo wrote:
[Please CC replies to cactus@xxxxxxxxxxxxxxxx]
Hi,
I'd like to create a pixbuf sub-column inside a GtkTreeView column that
doesn't take up any space when the pixbuf is empty. Currently I'm
setting up the view like this:
column = gtk_tree_view_column_new ();
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (column, renderer, false);
gtk_tree_view_column_add_attribute (column, renderer, "pixbuf",
COLUMN_ICON);
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (column, renderer, true);
gtk_tree_view_column_add_attribute (column, renderer, "text",
COLUMN_LABEL);
gtk_tree_view_append_column (treeview, column);
However, as you can see in this screenshot:
http://cactus.rulez.org/files/treeview-align.png
the same width is allocated for empty pixbufs.
How can I avoid that?
Maybe you could modify the data before it's displayed with
gtk_tree_model_filter_set_modify_func().
_______________________________________________
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list