[Gtk-sharp-list] Sorting treeview with filter

Nuno Marques nmmstuff at sapo.pt
Fri Aug 11 08:39:20 EDT 2006


Hi,

is it possible to sort a treeview with a filter associated with it?

Before I had:

lstGroup.Model = model = new Gtk.TreeStore (typeof(NewsGroup), typeof
(string), typeof (uint), typeof (uint));			

and worked just fine, now I added a filter:

groupModel = new Gtk.TreeStore (typeof(NewsGroup), typeof (string), typeof
(uint), typeof (uint));
groupFilter = new Gtk.TreeModelFilter (groupModel, null);
groupFilter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc
(filterGroups);
lstGroup.Model = groupFilter;

and the sorting functions don't work anymore, showing this error on
console:

(./bin/nnews.exe:27550): Gtk-CRITICAL **:
gtk_tree_sortable_get_sort_column_id: assertion `GTK_IS_TREE_SORTABLE
(sortable)' failed
(./bin/nnews.exe:27550): Gtk-CRITICAL **:
gtk_tree_sortable_has_default_sort_func: assertion `GTK_IS_TREE_SORTABLE
(sortable)' failed
(./bin/nnews.exe:27550): Gtk-CRITICAL **:
gtk_tree_sortable_set_sort_column_id: assertion `GTK_IS_TREE_SORTABLE
(sortable)' failed


Anyone has solved this before?


Thanks,

Nuno Marques


PS: Sorry if I double posted, sent the last msg with wrong email


More information about the Gtk-sharp-list mailing list