Re: [gtkmm] 2 questions about treeview and sorting



B.Hakvoort wrote:
Hmmz, it seems i need to explain myself better. When i sort the contents
of a treestore, the sorting will affect *every* row in the view (which
makes sense). This always worked fine for me, till now.
In my current view a have parents (which i want to sort in
ascending/descending order) and some childs. The childs are placed in a
very specific order and may not change place. So here's my question
again: Is there a way to sort the parents and leave the childs alone?


You can provide your own sort function by using TreeSortable::set_sort_func(). Or you can make your own TreeModel (possibly deriving from TreeStore) and implement the TreeSortable interface in whatever what you like.

--
Christer Palm




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