Re: GtkTreeView madness...
- From: Jasper Huijsmans <j b huijsmans hetnet nl>
- To: gtk-app-devel-list gnome org
- Cc: Jonathan Blandford <jrb redhat com>
- Subject: Re: GtkTreeView madness...
- Date: Thu, 14 Feb 2002 20:49:47 +0100
2/14/02 8:43:47 PM, Jonathan Blandford <jrb redhat com> wrote:
Jasper Huijsmans <j b huijsmans hetnet nl> writes:
2/14/02 7:32:15 PM, Jonathan Blandford <jrb redhat com> wrote:
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.
This works perfectly for me. It would IMVHO also be an excelent
example to add to the documentation, because it is not
immediately
obvious. This allows practically any kind of data to be
presented
in a treeview (without having to write a custom model).
I'm pretty busy fixing bugs in it. )-: If you are up to taking
the time
to make some small fixes to the docs, that would be great.
Thanks,
-Jonathan
I wasn't suggesting you should do it. I'm sorry if I gave that
impression. I also can't promise I can find the time to help with
the docs, but I'd like to try. Probably will be after the 2.0
release I'm afraid.
Oops, I also seem to have send it to you personally, instead of to
the list. Sorry again :(
Jasper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]