I have a simple question. I am using a GtkTreeView, where one column is displayed as GtkCellRendererCombo. The user can either freely edit the text of the cell, or choose for it a value from the combo.
The problem is that once the user chooses a value from the combo, I need to capture the text he was previously writing into the cell.
I cannot use the GtkTreeStore object for capturing the text, because the edit has not finished yet and therefore the GtkTreeStore is not up to date.
Is there anyone with any suggestion?
If you are using Gtk 2, it works to hook up to the 'editing-started' signal of the cellrenderercombo. Then do a combobox.get_child(), which returns the text entry of the combo. Then you would hook up a 'changed' signal to the text entry to retrieve the text the user is typing.
If you are using Gtk 3 you need to create your own custom cell renderer widget so that you can have access to the entry. I created my own combo widget in Python to have autocompletion in the entry, but I am not sure if that would help you.