Hi all,
I have a dialog with several hboxes that I fill with combo boxes built
dynamically, like this:
-----8<-----
# description
hb = self.dialog.get_widget('hbox2')
cb = gtk.combo_box_new_text()
for desc in DESCRIPTIONS:
cb.append_text(desc)
hb.add(cb)
cb.show()
cb.connect('changed', self.select_desc)
self.cb_desc = cb
-----8<-----
Using the exact same technique, I build another combo box for CATEGORIES and
call it self.cb_cat.
Then, when the first combo is changed, I want to change the contents of
CATEGORIES below it to reflect the new valid choices:
-----8<-----
def select_desc(self, combo):
des = DESCRIPTIONS[combo.get_active()]
if des == CONTR:
self.cb_cat = gtk.combo_box_new_text()
for cat in CATEGORIES[0:3]:
self.cb_cat.append_text(cat)
-----8<-----
But I keep getting the original contents in the new box. I've tried
deleting the old box entirely (del self.cb_cat) and creating another, but no
difference.
What is the solution?
jm
--
My other computer is your Windows box.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/