Re: How to delete PyGTK ComboBox entries?

2007-02-26 Thread Maël Benjamin Mettler
Hej! > > > > model = combo_box.get_model() > > combo_box.set_model(None) > > model.clear() > > for entry in desired_entries: > > model.append([entry]) > > combo_box.set_model(model) > > > > model.append is essentially the same as combo_box.append_text. Setting > > the model to None before makin

Re: How to delete PyGTK ComboBox entries?

2007-02-26 Thread Osmo Salomaa
ma, 2007-02-26 kello 16:08 +0100, Maël Benjamin Mettler kirjoitti: > I need to repopulate PyGTK ComboBox on a regular basis. In order to do > so I have to remove all the entries and then add the new ones. > And then repopulate by iterating through the list of desired entries and > calling ComboBox

How to delete PyGTK ComboBox entries?

2007-02-26 Thread Maël Benjamin Mettler
Hello list! I need to repopulate PyGTK ComboBox on a regular basis. In order to do so I have to remove all the entries and then add the new ones. I tried to remove all entries like that: def clear_comboboxes(boxreference): try: while True: boxreference.remove_text(0) e