Question on wx.ComboBox .Clear()

Am I correct in my observations that issuing a .Clear() command on the
list of a wx.ComboBox deletes all items but the one currently displayed?

   If not, I wonder why I need to explicitly issue a .SetValue(' ') to clear
the displayed item, too.

Rich

···

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

Rich Shepard wrote:

  Am I correct in my observations that issuing a .Clear() command on the
list of a wx.ComboBox deletes all items but the one currently displayed?

  If not, I wonder why I need to explicitly issue a .SetValue(' ') to clear
the displayed item, too.

Because by virtue of being a wx.ComboBox and not a wx.Choice, the value in the textctrl portion is not permanently tied to the selected value in the drop-down. Think of it as a wx.TextCtrl with a popup wx.ListBox. You can still type whatever you want in the textctrl, so there is no reason for an empty listbox to mean that the textctrl must be empty too.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!