| FAQ Index - Search - Recent Changes - Everything - Add entry |
14.13. How do I add items into GtkCombo
This code add one or many items to GtkCombo object named combo
Just add one item like this
listitem = gtk.ListItem("String 1")
combo.list.append_items([Listitem])
listitem.show()
Or if you like you can add two:
listitem_a = gtk.ListItem("String 2")
listitem_b = gtk.ListItem("String 3")
combo.list.append_items([listitem_a, listitem_b])
listitem_a.show()
listitem_b.show()
