?
=?ISO-8859-15?Q?Ma=EBl_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)
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
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