ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 16日 (木) 07:09:20 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -334,6 +334,8 @@ === Sorting Tree View +Sorting in GTK+ is define in Gtk::TreeSortable module, or as GTK+ programmers like to say interface. This interface is implemented by all model classes, hence views can demand that model data be sorted. This is accomplished by setting Gtk::TreeStore#sort_column_id or Gtk::TreeStore#sort_column_id. However, in order to equip column headers with sorting visual indicators and triggers to initialize sorting processes, view also needs to be aware those columns. To give this information to tree view we employ Gtk::TreeViewColumn#sort_column_id=(sort_column_number). + Following is the same program as above with added sorting features. ((*liststore-sorting.rb*))