Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法在 wxpython 中对多个 listctrls 进行排序。我可以排序一个但不能排序另一个。我假设这一切都围绕着一个名为 GetListCtrl 的函数的 ColumnSorterMixin 要求。该函数只能返回一个 listctrl,否则会发生索引错误,因为它只会对最后返回的 listctrl 进行排序。有没有解决的办法?非常感谢!
听起来您ColumSorterMixin在创建作为 listctrls 父级的类时正在使用,就像在演示中一样,并将多个 listctrls 放在父级上。如果您在派生新类时将其用作基类之一,ListCtrl则GetListCtrl只需返回 self,然后每个 listctrl 将拥有自己的排序器。
ColumSorterMixin
ListCtrl
GetListCtrl