GtkCellRenderer: start editing with an initial value

Is there any way to make a GtkCellRendererText start editing, while also
specifying what text it should start with.
gtk_treeview_set_cursor_on_cell() can start the editing, but first it
puts the data from the tree model in the CellRenderer.

I want to do this in my GtkCellRendererText::edited signal handler so
that I can ask the user to edit the text again until it passes
validation. I'd like the user to start the second editing with the bad
text from the first edit, without ever putting the bad text in the

I tried doing some of what gtk_treeview_set_cursor_on_cell() does,
including the strange cell_background, and cell_area stuff, but I'm not
sure what to pass for the widget parameter of

gtk_treeview_set_cursor_on_cell() seems to eventually get that widget
from the private gtk_tree_view_column_cell_process_action() function,
but I'm lost there.

Murray Cumming
murrayc murrayc com

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