buddahb_88
buddahb_88

Reputation: 1

wxpython sorting multiple listctrls

I'm having trouble sorting multiple listctrls in wxpython. I can sort one but not another. I assume it all circles around the ColumnSorterMixin requirement for a function called GetListCtrl. That function can only return one listctrl otherwise and index error will occur as it will only sort the last returned listctrl. Is there a way around this? Many thanks!

Upvotes: 0

Views: 31

Answers (1)

RobinDunn
RobinDunn

Reputation: 6306

It sounds like you are using the ColumSorterMixin when creating the class that is a parent of the listctrls, like in the demo, and putting multiple listctrls on the parent. If you instead use it as one of the base classes when deriving a new ListCtrl class then GetListCtrl can just return self, and each listctrl will then have its own sorter.

Upvotes: 0

Related Questions