[pygtk] GTK + Glade + Python combo box
Volker Helm
helm.volker at gmx.de
Tue Jun 12 13:54:45 WST 2007
Hi Bob,
I can understand you, it's not that easy.
> Code: ( text )
>
> 1.
> myCombo = self.wTree.get_widget('comboboxentry')
> 2.
> myCombo.append_text('blah blah blah')
Here is some of my code:
self.model_scrit = gtk.ListStore(str)
self.model_scrit.append(["Value 1"])
self.cb = self.Tree.get_widget("cb_AdSearch")
self.cb.set_model(self.model_scrit)
cell = gtk.CellRendererText()
self.cb.pack_start(cell)
self.cb.add_attribute(cell,'text',0)
self.cb.set_active(0)
I use the GtkComboBox class.
Hope that helps,
Volker
More information about the pygtk
mailing list