Reputation: 73
I'm using Python with GTK, and I need to select more than one option in the ComboBox widget, but after searching the documentation, apparently it is not possible.
Does anyone know what I can do this?
Upvotes: 2
Views: 891
Reputation:
For anyone needing multiple selection with GTK 2 specifically, you can refer to the answer I wrote on a different post over here.
The idea is to use a TreeView
and change its associated TreeSelection
:
tree_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
and it looks like this (full MWE here):
Upvotes: 1
Reputation: 11454
When you don't know which widget can get the work done, give a look at the widget gallery of the GTK+ documentation. From the screenshots, GtkListBox looks like a good candidate for what you want to do, as you can have checkboxes for each item, meaning you can have multiple selection.
Upvotes: 2