How to set item focus in GtkTreeView?



Is there a simple way to set a focus on an item in the GtkTreeView without changing its selection state?

I've tried using gtk_tree_view_set_cursor API, but it seems to always set item selected too.

My current solution is to:
1. read selection state of an item
2. call gtk_tree_view_set_cursor to set both focus and selected state
3. restore selection state to be the same as before the step 2.

Problem is this causes a big flicker, making it unusable.

Is there any better way? Is there an API for this that I missed when looking ?

TIA



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