[wxPython-users] Sorted List Control - how?

Peter Hansen peter at engcorp.com
Sun Dec 10 06:56:46 PST 2006


Donn Ingle wrote:
> I have been sorting a list before putting its elements into a list-control,
> but is there a way to make the list-control itself maintain a sort-order?

The docs show a SortItems() call that does this.  (Note it doesn't 
"maintain" it for you... you just call that method to ensure it is 
sorted whenever you want it to be.)

> Even more importantly, can it do so based on the current locale?

Since you supply the method to do the comparison, certainly... just make 
sure to handle the locale correctly yourself.

-Peter




More information about the wxpython-users mailing list