Preselect (highlight) a perticular row in treeview

Is there a way to highlight/select a particular row in GtkTreeview when it loaded or Re-loaded from the model. I have used:

gtk_tree_selection_select_path (selection,Selected_Path);

but it doesn’t seem to highlight it.


That call works fine for me.

Path has to be valid, you probably want to unselect_all prior to calling select_path and you may need to scroll_to_cell once the path is selected.

Without seeing the actual code… hard to say why it’s not working for you.

1 Like

Hi Dies!!
Thanks for the reply.
Like to mention that my immediate problem was solved by using ‘gtk_tree_view_set_cursor’. The cursor term is slightly misleading here, since you can use the function while not editing, also.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.