Sorting A ComboBox

Rich Shepard rshepard at appl-ecosys.com
Tue Oct 2 08:33:10 PDT 2007


   The current thread on sorting a ListBox reminded me to ask why the style,
wx.CB_SORT might not be working for me. Here's the definition of a widget:

 	self.vcomp = wx.ComboBox(self, wx.ID_ANY, size=wx.Size(150, 25),
                              style=wx.CB_DROPDOWN|wx.CB_SORT|
                              wx.TAB_TRAVERSAL|wx.RAISED_BORDER)

yet, when values are loaded into the dropdown list, they're not sorted
alphabetically. I assume it's a step that I've missed and a nudge in the
right direction will help.

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




More information about the wxpython-users mailing list