Re: gtktreeview: highlighting a cell



On 12/12/2014 06:57 PM, Allin Cottrell wrote:
I'm using GtkTreeView to implement a simple spreadsheet.

With GTK 2, if use gtk_tree_view_set_cursor() to place keyboard focus
on a given cell, with the last argument set to FALSE so that editing
mode is not entered immediately, I get a visual indication of which
cell is focused. It's fairly subtle, but a gray box is drawn around
the cell content.

Using the same code with GTK 3, I'm getting no such visual indication.
The cell is focused OK -- pressing Enter starts editing -- but you get
no visual clue as to which cell has focus. Is there any way to emulate
the GTK 2 behavior?

(In this comparison I'm using the Adwaita theme with gtk 2.24.25 and
3.14.5.)

Thanks for any guidance.

I am using cell-data function for this and change the background color :/
https://github.com/Buzztrax/buzztrax/blob/master/src/ui/edit/main-page-sequence.c#L338-370

Stefan


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