Re: GtkTreeView madness...

Joshua N Pritikin <vishnu pobox com> writes:

On Thu, Feb 14, 2002 at 04:26:19PM +0100, Fabio Rotondo wrote:
1-  can anybody explain me where is the main difference between GtkListStore
and GtkTreeStore?

Elements of a list don't have children.  Elements of a tree can have children.

2 - If I have all my data inside my private structures and want to show 
them inside
a TreeView, which one of the above shoud I use to not duplicate data?

The best way is to implement a GtkTreeModel interface for your private
data structure.

Rather then that, you can put your data in the model (ie, make the
column type G_TYPE_POINTER), and use
gtk_tree_view_column_set_cell_data_func to custom set your values.

3 - Do I need a CellRenderer if all my columns just render text? If so, 
can I "share" the CellRenderer or should I create one for each column?

i'm not sure, but based on practical experience: sharing doesn't work.

There are times when sharing will work fine, but rather then explaining
this, it is easier to just tell people to use a separate renderer per


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