Re: gtktreeview API request



On Fri, 26 Nov 2004, Matthias Clasen wrote:

On Fri, 2004-11-26 at 23:07 -0500, Allin Cottrell wrote:

it's very difficult if not impossible to get a
treeview to act like a simple spreadsheet, where the user can move
to a given cell and simply start typing to fill out the cell's data.
The GTK programmer can arrange that, e.g., typing a number starts
the cell editing process, but then the first number typed is "eaten"
and there's no way (that I can see) to pass it into the GtkEntry
that is created as part of the cell editing process: this widget is
private and inaccessible.

In 2.6, GtkCellRenderer has an editing-started signal, which gives you
access to the GtkCellEditable (ie the widget which is used for editing
the cell). Not sure if that will help you, but it shows that the widget
is no longer totally private and somewhat accessible.

That does sound very useful.

Just for reference, after posting I figured out a solution to my current problem. I can let, say, the pressing of a numeric key start the editing of a treeview cell. But then how to get this first number into the editable cell? Aha, synthesize an artificial key_press event using the keyval from the real key_press that we captured. Works nicely.

Allin Cottrell



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