I have read this manual to create a simple combo-box with strings:
But when I start my application I get this message:
(button.py:7646): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
And the combo box appears but the item (the only item I’m adding) don’t appears
This is my source:
class Ventana(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self,title="Test Window")
paises=Gtk.ListStore(int,str)
paises.append([1,"test"])
combo=Gtk.ComboBox.new_with_model_and_entry(paises)
combo.set_active(0)
self.add(combo)
Set the entry for combo by calling set_entry_text_column(column) instead of combo.set_active(0)
See : http://python-gtk-3-tutorial.readthedocs.org/en/latest/combobox.html?highlight=set_entry_text_column