Question about set cursor

gtk_tree_view_set_cursor_on_cell and gtk_tree_view_set_cursor (discourse wouldnt accept title)

These two functions do two similar things. However it seems there action is reversed to how I would expect
(both scenarios with one-click operation enabled on treeview)
gtk_tree_view_set_cursor_on_cell
First click selects row, then you have to click again to edit cell

gtk_tree_view_set_cursor
edits cell on one click

I would have assumed, from the documentation, it would be the other way round

Both functions have a start_editing parameter; did you pass TRUE?

The only difference between the two is that the _on_cell variant calls gtk_tree_view_column_focus_cell, which is only useful if a column has multiple cell renderers. If you do have multiple cell renderers, maybe you’re specifying the wrong one in _set_cursor_on_cell?

It seems like gtk_tree_view_set_cursor is intelligent enough to discount cells that are non-editable/not visible, while gtk_tree_view_set_cursor_on_cell requires you to extract the the cell you want explicitly.

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