[Glade-users] something going wrong with ComboBoxEntry
nephish
nephish at xit.net
Thu Aug 17 08:56:00 EDT 2006
Hey there all,
i have two questions about a ComboBoxEntry.
i am trying to load the values in it via list.
i only need one column of info, like an old style simple ComboBox, that
as i understand it, is being depreciated.
my first question is... there does not seem to be a set_text method. How
can i manually set the text inside from my script ?
and two, it loads the lists just fine, but prints out a double column of
every value. One right beside the other.
here is the code:
# populate the Sensor Type list
self.new_list_store = gtk.ListStore(str)
new_cell = gtk.CellRendererText()
self.SensorTypeEntry.pack_start(new_cell)
self.SensorTypeEntry.add_attribute(new_cell, 'text', 0)
type_list = gDDS.getMany("SELECT `Type` FROM `Status_Def` \
ORDER BY `Type` + 1") # object that wraps sql query & returns tuple
for type_def in type_list:
self.new_list_store.append([type_def[0]])
self.SensorTypeEntry.set_model(self.new_list_store)
self.SensorTypeEntry.set_text_column(0)
any ideas ?
if you have read down this far, thanks for your time.
shawn
More information about the Glade-users
mailing list