[pygtk] Sticky item in TreeView
John Finlay
finlay at moeraki.com
Sun Mar 19 01:57:03 WST 2006
Lawrence Oluyede wrote:
> I have a treeview mapped onto a TreeModelSort mapped on a ListStore to
> ensure sortness of the items. This treeview is also used as a filter
> for another treeview. What I want to add to the first one is a "no
> filter" entry on top of it. The problem, obviously, is that "no
> filter" is lexicographically sorted with the other items. What I want
> is to leave it always on top of the treeview displayed list. An item
> not subject to sorting.
>
> There's a practical way to do that?
>
Write a sort comparison function that does what you want and use that. See:
http://www.pygtk.org/pygtk2reference/class-gtktreesortable.html#method-gtktreesortable--set-sort-func
John
More information about the pygtk
mailing list