Re: TreeView cell editing



I'm actually using the standard CellRendererText, but I would like my application to have a bit more controll over the gtk_entry while the cell is being edited. I can't seem to find any methods of any object that will return the gtk_entry so I can connect to some of its signals. It appears that your example is from a custom renderer. I wouldn't expect to have to subclass the renderer in order to do this.

Any thoughts?

James

Igor Gorbounov wrote:
James Pelletier wrote:

Is there a way to programatically determine if a cell in a tree view is currently being edited or to get the text from the entry field used for editing? More importantly, is there a way to force a cell that is currently being edited to end editing?
[...]


Well, may it won't help (because I've done this on C++ in gtkmm), but I've used the focus_out event for gtk_entry in a cell renderer to end the editing when user changes
focus while editing:

bool Combo_CellRenderer::on_focus_out(GdkEventFocus* event, Gtk::Entry* entry,
   Glib::ustring path)
{
   if (!entry->is_focus())
       on_edited(entry, path);
   return false;
}

   Igor Gorbounov



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