Search code examples
pythongtk3

GTK3 Python type in dropdown box


Is there away that I can make drop down box accept text. As I want to make the drop down box list previous item typed and be able to add new items.

I have had a good search on google but not found anything.

Thanks Sam


Solution

  • Your are looking for a Gtk.ComboBoxText with entry.

    from gi.repository import Gtk
    combo_box = Gtk.ComboBoxText.new_with_entry()
    

    See here for the documentation