April 9th, 2005, 05:37 PM
alphabetical order of wxPython List
I am trying to take a 2d list that on the 1st index of the inner list has a string that contans a name. I want to put each name of that into a listbox, i am using wxPython. So what i am wanting to know is if there is a tool out there that will put the names in the listBox in alphabetical order, if there isn't then how could i go about making a way to do it.
April 9th, 2005, 06:22 PM
I don't know too much about wxPython, but can't you add each item for the listbox into a list, sort the list, and then add each item in that list to the listbox?
Comments on this post
April 10th, 2005, 09:00 AM
I was reading the c++ api for wxWidgets. ListBox has a auto sort premitor right in it. You have to put it in the style part. it is wxLB_SORT. You could also just do the list thing, but this also does the trick.