I have a ListCtrl using ColumnSorterMixin to sort the columns when the user clicks on a column header. I would like it to be that, when when multiple items in a column are the same, they are kept in the same order that they were in previously. This isn’t what happens by default, as you can see from the wxPython demo. In that demo, if you start with Artist in alphabetic order and then click on Genre, the artists within a genre are not in alphabetic order (this is seen in the Rock genre).
I’ve looked at the code for the ColumnSorterMixin and I see there are functions GetSecondarySortValues and OnSortOrderChanged and I thought perhaps I could get secondary sorting to work the way I want using those functions. I have two questions: (a) Is this a sensible approach, or is there a better way? (b) In the arguments of GetSecondarySortValues, what are key1 and key2?
There are many entries in this group with headings like “ListCtrl sorting problem”. I’ve looked for a discussion of my problem there but didn’t find one; if I missed it, I apologize.
Patrick Maher
http://patrick.maher1.net