[pygtk] combobox and multi column liststore not showing text

Rob Brown-Bayliss uncertain.genius at gmail.com
Fri Feb 2 04:56:45 WST 2007


Hi, I have a combobox and liststore set up like this:

	self.arcs_markers_combobox = self.wtree.get_widget("arcs_markers_combobox")
	self.arcs_markers_model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_INT)
	self.arcs_markers_combobox.set_model(self.arcs_markers_model)

and from another class, I am adding values tothe liststore like this:

        self.group_combobox = self.parent.get_widget("arcs_markers_combobox")

	model = self.group_combobox.get_model()

	page_number = int(self.notebook.page_num(self.page))

	iter = model.append()

	model.set(iter, 0, label_text, 1, page_number)

	self.group_combobox.set_active_iter(iter)

	print "active text : "
 + self.parent.get_active_text(self.group_combobox)

this will print the value of label_text to treminal, but the combobox
does not show any text in the widget, or the drop down menu.  They are
both empty.

Any ideas as to what I am doing wrong or where the problem is?

Thanks...



-- 
Rob


More information about the pygtk mailing list