Seg, 2005-06-06 às 07:04 -0400, Jeff Elkins escreveu:
What is the method of loading a combobox post-creation?
Currently I load choices with a list at program start:
wx.ComboBox(choices=mylist
But I'd like to update that when the list changes.
You have several methods:
Append(self, String item, PyObject clientData=None):
Adds the item to the control, associating the given data with the item
if not None. The return value is the index of the newly added item
which may be different from the last one if the control is sorted (e.g.
has wx.LB_SORT or wx.CB_SORT style)
AppendItems(self, List strings):
Apend several items at once to the control. Notice that calling this
method may be much faster than appending the items one by one if you
need to add a lot of items.
Insert(self, String item, int pos, PyObject clientData=None):
Insert an item into the control before the item at the ``pos`` index,
optionally associating some data object with the item.
This methods are from wxControlWithItems which ComboBox is derived from.