Adding Items to wx.ComboBox

It look like:

wx.ComboBox.Insert() is what you want

(inherited from wxControlWithItems)

-Chris

Rich Shepard wrote:

···

  I use a dialog box to get the values for some variables. When the "OK"
button is clicked, those values are displayed in the appropriate widgets.
Then, the "Save" button is clicked to write the record to the database
table.

  One of these widgets is a wx.ComboBox(). I display the newly entered value
using SetValue(). After saving the data and pressing the "Add" button to add
a new value, the widgets displays are cleared and the newest set of values
replace the previous ones. I want the values for this comboBox widget to
accumulate in the list, rather than displaying one at a time.

  I bound EVT_TEXT to that widget, but must not have written the method
correctly. When I try to add a second value, the system crashes with a seg
fault.

  The demo shows how to work with a list of values already present, not how
to add values. I'd appreciate some pointers on how to add to the list for
that one widget as each new set of values is entered.

Rich

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Ah! Thank you.

   I will start looking higher in the tree for solutions when I don't see
them directly with the widget.

Rich

···

On Fri, 22 Dec 2006, Christopher Barker wrote:

It look like:

wx.ComboBox.Insert() is what you want

(inherited from wxControlWithItems)

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc.(TM) | Accelerator
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863