[pygtk] TreeView (liststore) sorting.

Pietro Battiston toobaz at email.it
Wed Feb 3 15:27:37 WST 2010


Il giorno mar, 02/02/2010 alle 22.59 +0100, middleofdreams a gmail.com ha
scritto:
> I was looking for this in net but still i have no idea how to set
> priority of sorting. For example i'm doing:
>  somelistmodel.set_sort_column_id(0,gtk.SORT_ASCENDING) and it sort it
> right. But when elements in column 0 are the same, a want to sort by
> column 1.
>  How to?
> I've tried
> somelistmodel.set_sort_column_id(1,gtk.SORT_ASCENDING)
> somelistmodel.set_sort_column_id(0,gtk.SORT_ASCENDING), but that
> doesn't work.
> 

http://www.pygtk.org/docs/pygtk/class-gtktreesortable.html#method-gtktreesortable--set-sort-func

I strongly suggest using devhelp and taking a look at the page of the
classes you happen to use: even by a fast glance, you can learn many
things.

Pietro



More information about the pygtk mailing list