Moving items in a list

L. Fanchi lorenzo.fanchi at gmail.com
Mon Mar 10 10:10:02 PDT 2008


Hello,

I'm using an EditableListBox to display a list of images. I'd like to 
add the possibility of sorting an item in the list up or down.
Now I bound the Up and Down buttons of the EditableListBox to OnUpItem 
and OnDownItem, respectively, but I'm not sure that the best way is to 
code the sorting. Changing the index won't work, I guess, since adding 1 
to the index of the currently selected item will overwrite the entry 
that is currently on 'selected item + 1'. I hope I described the problem 
clearly ;)

Thanks for your help!
Lorenzo




More information about the wxpython-users mailing list