Hi GTK community, 

i have a problem with selection GtkTreeView. I can't get the content of 
(unique) row selected with a simple click. I have to get te content when i 
press a button, but my function returns all the time the content of the first 
row. Here my function : 

gchar* 
get_entry_list (GtkTreeView *TreeView, gint Cols) 
{ 
GtkTreeModel *Model = gtk_tree_view_get_model (TreeView); 
GtkTreeSelection *Select = gtk_tree_view_get_selection (TreeView); 
gtk_tree_selection_set_mode (Select, GTK_SELECTION_SINGLE); 
GtkTreeIter pIter; 
gchar *ID = NULL; 


if (gtk_tree_selection_get_selected (Select, &Model, &pIter)) 
{ 
gtk_tree_model_get (Model, &pIter, Cols, &ID, -1); 
} 

return ID; 
} 

How i can do ? Maybe it's because the lost of focus on GtkTreeView ? 

Thks. 

Alex. 
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to