Making an empty TreeView sub-column not take up any space



[Please CC replies to cactus cactus rulez org]

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?

Thanks,
	Gergo

--
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Voltam IQ-teszten. Szerencsére negatív.


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