Re: GtkTreeView: displaying structures and sorting
- From: Havoc Pennington <hp redhat com>
- To: martine cs washington edu
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView: displaying structures and sorting
- Date: 12 Apr 2002 12:32:43 -0400
martine cs washington edu writes:
I've scoured the documentation and glanced over the mailing list, and
I'm surprised this isn't a FAQ.
TreeView is so new we don't have enough sample data to recognize FAQs
yet (except "how do I set the color of a row" ;-)
At least in the context of this
program, there are many different places where I want to display some
sort of list of structures, and I imagine that most other programs would
too.
So how should I be doing it? (Assume that my structure is sorta
heavyweight and I'd like to avoid copying the data needlessly if at all
possible.)
And, finally, while I have your attention: even if I pick the first
option, accepting that the list store will duplicate all of my data and
I'm careful to refresh the data when it changes, how can I sort data
that is displayed by a Pixbuf? (For example, I have a "type" column,
which displays an icon representing the type; sorting on it should at
least group the rows by their type, and I'd like to choose the order
myself.)
I think the basic answer is that you want to set the sort function.
You can apparently have an arbitrary number of sort functions; the
"column IDs" for the sort functions are separate IDs from the model or
view column IDs. Or something, it confused me too. ;-)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]