GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unselection in gtktreeview

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
cnu_sree
GTK+ Geek


Joined: 06 Oct 2006
Posts: 57

PostPosted: Fri Apr 27, 2007 6:30 am    Post subject: unselection in gtktreeview Reply with quote

iam using gtktreeview witk gtkliststore model.
wht i need is want to remove the selection
i tried this but it doesn't seem to work
gtk_tree_model_unref_node (GTK_TREE_MODEL(store2), &iter1);
thank u
sree
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 372
Location: State College, Pennsylvania

PostPosted: Fri Apr 27, 2007 1:01 pm    Post subject: Reply with quote

So, what you are saying is that you want to deselect any rows that happen to be selected? Well, then use the following functions:

Code: (Plaintext)
1
2
3
4
GtkTreeSelection *selection;

selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
gtk_tree_selection_unselect_all (selection);


You should check out GtkTreeSelection, because there are a multitude of functions for handling selected rows there.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP