Help using gtk_tree_selection_select_path()





Has anyone encountered any trouble using the above gtk_tree_selection_select_path(). I have a GtkTreeView 
where I want to manually select a row in the GtkTreeView. However when I use gtk_tree_selection_select_path I 
just can't get it to work. I have the following:

path = gtk_tree_path_new_from_string( "4" );
        
gtk_tree_model_get_iter( GTK_TREE_MODEL( model ), &iter, path );
        
gtk_tree_view_expand_to_path( GTK_TREE_VIEW( tree_view ), path );
gtk_tree_view_set_cursor( GTK_TREE_VIEW( tree_view ), path, NULL, FALSE );
        
gtk_tree_selection_select_path( select, path );


I can set the cursor to the required row but I can't seem to set the selection to the row. Is there something 
that I am missing. 

Thanks, 

Mike

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is 
intended solely for the use of the individual or entity to whom they are addressed and may be subject to 
legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply 
e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any 
purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are 
solely those of the author and do not necessarily represent those of the company.  The recipient should check 
this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage 
caused, directly or indirectly, by any virus transmitted in this email.
******************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]