[Gtk-sharp-list] Sorting a TreeView with a filter
ThinkDave
DavidMyersIs at gmail.com
Wed Apr 22 08:13:03 EDT 2009
I know this thread is old but I came across it so many times when I was
trying to solve this exact problem so to save another helpless googler ill
add the answer.
Gtk.TreeModelFilter filter;
Gtk.TreeModelSort filter_sort;
filter = new Gtk.TreeModelFilter(taskListStore, null);
filter_sort = new Gtk.TreeModelSort(filter);
filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc (FilterTree);
taskListTreeView.Model = filter_sort;
filter.Refilter ();
You have to wrap the filter in a TreeModelSort then use the result as the
model for the TreeView.
--
View this message in context: http://www.nabble.com/Sorting-a-TreeView-with-a-filter-tp19463593p23175049.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list
mailing list