Re: Start editing a GtkCellRendererText using F2

2007-09-10 Thread Kristian Rietveld
On Sun, Sep 09, 2007 at 11:57:07PM -0400, Andrew Smith wrote:
> I can do 
> gtk_accelerator_parse()/g_cclosure_new()/gtk_accel_group_connect() to 
> have a callback called when F2 is pressed but I've no idea how to tell 
> the callback to edit the selected cell.

You can use one of gtk_tree_view_set_cursor() or
gtk_tree_view_set_cursor_on_cell() to get the tree view to start
editing.  Be sure to set the start_editing parameter to TRUE.  For the
path parameter it is best to pass in the current location of the key
navigation cursor which you can get using gtk_tree_view_get_cursor().


regards,

-kris.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Start editing a GtkCellRendererText using F2

2007-09-09 Thread Andrew Smith
Hi

I have a GtkTreeView and one of the columns is an editable 
GtkCellRendererText.

I would like to have the F2 key edit the cell, just as clicking on it 
does, but I can't figure out how.

I can do 
gtk_accelerator_parse()/g_cclosure_new()/gtk_accel_group_connect() to 
have a callback called when F2 is pressed but I've no idea how to tell 
the callback to edit the selected cell.

Is this doable?

Thanks in advance,

Andrew

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list