Re: Showing the value in a GtkTreeViewColumn depending on a condition



You don't do it on a per-column basis, but on a per-render basis and
there are a number of ways to do that. The easiest and most
straightforward is to have a column in your GtkTreeStore (assuming
you're using this and not writing your own) something along the lines of
"IS_ROOT" with a type of G_TYPE_BOOLEAN that you assign to the "visible"
property of the GtkCellRenderer you want to hide.  Then, when you insert
your data, just make sure that column is set appropriately and it will
work.  The other way to do it is using _set_cell_data_func () on the
cell renderer and doing everyting that way.

--Shahms

On Mon, 2002-07-01 at 14:05, Tilman Sauerbeck wrote:
Hi,
I'm having a GtkTreeView with a bunch of columns which I fill with
gtk_tree_store_append(); and
gtk_tree_store_set();

I'd like the value in column X only to be shown on root level tree items, not on any child items.

Is there some special value I set to the tree store so it doesn't get displayed? ;)
Is there any other (simple *g*) way to do this?

Thanks in advance,
Tilman

-- 
Get GKrellM Newsticker @ http://gk-newsticker.sourceforge.net
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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