RE: How to remove all the selectd row in Treeview?
- From: <martyn 2 russell bt com>
- To: <tom liu flextrade com>, <gtk-app-devel-list gnome org>
- Subject: RE: How to remove all the selectd row in Treeview?
- Date: Thu, 30 Oct 2003 16:10:01 -0000
HI,
I made a list with TreeView, I want to remove all the select
rows, which
function I should use?
(the selection may have more than one row).
Set up a foreach scenario for all selected items:
GtkTreeSelection *selection = NULL;
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_foreach(selection, remove_cb, NULL);
then in the callback:
void remove_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer userdata)
{
GtkTreeStore *store = NULL;
store = GTK_TREE_STORE(model);
gtk_tree_store_remove(store, iter);
}
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]