wxPython - ListCtrl ColumnSorterMixin sometimes works sometimes doesn't!

kyosohma at gmail.com kyosohma at gmail.com
Mon Jul 9 16:19:59 CEST 2007

On Jul 7, 7:55 am, Steve Senior <stevensen... at f2s.com> wrote:
> Hi,
> 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.
> Many Thanks,
> Steve.

It sounds a lot like your program is firing an event twice. What event
are you using to capture the mouse-click? You are much better off
posting wxPython specific questions to the wxPython user's list:


More information about the Python-list mailing list