List Info

Thread: RE: Sorting A ComboBox




RE: Sorting A ComboBox
country flaguser name
United States
2007-10-03 08:43:22
 

> -----Original Message-----
> From: Robin Dunn [mailto:robinalldunn.com] 
> Sent: Tuesday, October 02, 2007 2:42 PM
> To: wxPython-userslists.wxwidgets.org
> Subject: Re: [wxPython-users] Sorting A ComboBox
> 
> Rich Shepard wrote:
> >   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.
> 
> Please enter a bug report about this with a category of

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

In the mean time, you can always sort the list manually
before putting it
in the wx.ComboBox.

someList.sort() does the trick.

Mike


------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


RE: Sorting A ComboBox
country flaguser name
United States
2007-10-03 10:02:01
On Wed, 3 Oct 2007, Mike Driscoll wrote:

> In the mean time, you can always sort the list manually
before putting it
> in the wx.ComboBox.
>
> someList.sort() does the trick.

Mike,

   Good recommendation. Thank you.

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

------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )