wxPython - ListCtrl ColumnSorterMixin sometimes works sometimes doesn't!
stevensenior at f2s.com
Sat Jul 7 14:55:53 CEST 2007
My application has a tree control in which a user can select a filter.
This filter is then applied to the results and the results are
constructed in the ListControl (report style) widget.
This all works fine.
Recently I added the wx.lib.mixins.listctrl.ColumnSorterMixin mixin to
the ListCtrl widget.
Now here is the problem. On some of the filters you can sort all of the
columns both ascending and descending - i.e. if you click a column once
it will sort properly, then if you click the column again it will
happily reverse the sort.
On some of the filters you can only sort the column once. Repeated
clicks do not reverse the sort order. I added some print statments to
the listctrl.py to see what was happening here and it appears that when
you click the column for the second time, it actually sorts it twice
which means that the display doesn't change!
This is really perplexing me, I've exhausted all of my options and need
some help please.
More information about the Python-list