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)
    except:
        pass

And then repopulate by iterating through the list of desired entries and
calling ComboBox.append_text(text). It works, but is painfully
sloooooooow! Is there a faster way to completely change the entries in a
ComboBox, by using an all erase method or overwriting the container
object? I haven't found anything with google, as the searches are too
ambiguous to yield usable results.

Thanks,

Maël
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to