Re: [gtkmm] 2 questions about treeview and sorting



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?

(I solved it temporarely by erasing all childs from the view before
sorting and put them back in afterwards. This works, however, i don't
like it, it's not very elegant and the performance is horrible on
somewhat slower machines.)

Maybe it's possible to "hide" the childs while sorting? Or freeze their
position?

Thanks for any insights on the matter!

Bart

PS. i hope you understand i'm talking about sorting in runtime after
clicking a columnheader. Just thougt i'd mention it ;^)

On Tue, 2004-05-18 at 20:12, B.Hakvoort wrote:
> Hi,
> 
> As subject indicates i have two questions about the sortingbehaviour of
> the treeview.
> 
> 1.Is it possible to sort only parentnodes and leave the childs alone?
> atm i use set_sort_column_id(<column>, Gtk::SORT_ASCENDING) and this
> sorts all rows in the view.
> 
> 2.When calling set_sort_indicator() to get that nice little arrow in the
> header, it'll also grey the whole sorted column. This isn't really a
> problem, but it is quite annoying. Maybe it isn't gtkmm, but merely a
> theme-setting? ( cannot test this from where i am )
> 
> Thanks for any idea's/answers,
> 
> Bart
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list




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