Re: Programatically make cell editable



On Jan 26, 2010, at 8:11 AM, Vikram Noel Ambrose wrote:

> How do you programatically put a cell on a GtkTreeview into the edit mode?
> 
> For example nautilus allows you to type in a new file name, when you right-click and select "New folder". I'd like to implement a similar function, whereby when a button is clicked, a new row is inserted with default text (GtkTextCellRenderer) and then automatically put into edit mode to allow the user to immediately edit the contents and finish the edit.

After inserting the row, call gtk_tree_view_set_cursor().  Set the path parameter to the new row, focus_column to column to focus/edit and by setting start_editing to TRUE it will start editing progamatically.


regards,

-kris.



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