Python 如何在ListCtrl中设置选定项?

Python 如何在ListCtrl中设置选定项?,python,wxpython,Python,Wxpython,如何在给定索引的情况下以编程方式将项目设置为所选项目?使用ListCtrl方法 OP添加:wx.LC\u SINGLE\u SEL只允许选择一项 Select(self, idx, on=1) [de]select an item

如何在给定索引的情况下以编程方式将项目设置为所选项目?

使用ListCtrl方法


OP添加:
wx.LC\u SINGLE\u SEL
只允许选择一项
Select(self, idx, on=1)

[de]select an item