[pygtk] Two columns in ComboBox with add_attribute
Jeffrey Barish
jeff_barish at earthlink.net
Thu May 10 02:01:46 WST 2007
When I follow the directions in the FAQ for populating a ComboBox
combo = tree.get_widget("combobox1")
combo.set_model(store)
cell = gtk.CellRendererText()
combo.pack_start(cell, True)
combo.add_attribute(cell, 'text',0)
I get two columns of identical text in the popup menu. This is after
several liststore.append() commands to populate a few rows. When I comment
out the last line, I get the expected single column. I seem to be using
version 2.0 of pygtk. I am just learning treeviews and comboboxes, so most
likely I am doing something stupid. Any idea what?
Also, I want the box to display the first item as soon as I create the
ComboBox. What is the easiest way to do this?
--
Jeffrey Barish
More information about the pygtk
mailing list