Re: GtkTreeView cursor focus



Hi Jonathan,

hmm, I've understand your point. Here are some more details:

a.)
first colum: cell-renderer-text with mode=GTK_CELL_RENDERER_MODE_INERT
other columns : cell-renderer-text with mode=GTK_CELL_RENDERER_MODE_ACTIVATABLE: I don't get this rectange, but the cell-focus is nearly invisible (it is a dotted thin frame).

b.)
first colum: cell-renderer-text with mode=GTK_CELL_RENDERER_MODE_INERT
other columns : cell-renderer-text with mode=NULL
I get the row rectangle, I still can navigate left-right, but there is no visual indication of in which column I am.

What I am looking for is:
a.) moving the cursor around in activatable cells
b.) selecting rectangular areas

For b) I will look at gtk_tree_selection_set_select_function() ...

Ciao
 Stefan

Stefan Kost <ensonic hora-obscura de> writes:

I've already narrowed this a little further - its in gtktreeview.c (3801)

     /* draw the big row-spanning focus rectangle, if needed */
     if (!has_special_cell && node == cursor &&
     GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS) &&
     GTK_WIDGET_HAS_FOCUS (widget))
       {

Any idea how to change/extend this to allow different behaviours, like:
GTK_TREE_VIEW_DRAW_CELLFOCUS
GTK_TREE_VIEW_DRAW_ROWFOCUS=GTK_TREE_VIEW_DRAW_KEYFOCUS
GTK_TREE_VIEW_DRAW_COLUMNFOCUS

The key here is the '!has_special_cell'.  Since there are no special
cells in that row (where special is 'activatable' or 'editable'),
there's no need to focus individual cells.  I'm pretty sure confident
that this is the right behavior -- why do you expect something different
here?

Thanks,
-Jonathan




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