Re: [gtkmm] How to sort the widgets in a box?
- From: Paul Davis <paul linuxaudiosystems com>
- To: Maurizio Colucci <seguso forever tin it>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] How to sort the widgets in a box?
- Date: Mon, 15 Dec 2003 07:20:43 -0500
>In a file manager, I have a VBox containing a _lot_ of widgets.
>
>(each Widget is a HBox containing one ToggleButton and one Button. The
>ToggleButton contains a label with a filename)
>
>I must sort the widgets by filename.
>Can this be done with gtkmm? I get the children with Box::children(), which is
>
>of type Box_helpers::BoxList. But there is no sort() method...
>
>(I cannot simply destroy all the widgets and insert them again in the right
>order, since this takes too much time --- tested).
its O(logN) or worse, but Gtk::Container::reorder_child (Gtk::Widget&,
gint pos) might help. pos starts at zero.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]