> -----Original Message-----
> From: Robin Dunn [mailto:robin alldunn.com]
> Sent: Tuesday, October 02, 2007 2:42 PM
> To: wxPython-users lists.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-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|