wxpython之wx.ListCtrl 的列表插入
列表控件以多种格式显示列表:列表视图,报告视图,图标视图和小图标视图。
无论如何,元素从零开始编号。对于所有这些模式,项目都存储在控件中,并且必须使用wx.ListCtrl.InsertItem
方法添加到控件中。
InsertItem (self, info)
Inserts an item, returning the index of the new item if successful, -1 otherwise.//插入一个项目,如果成功,则返回新项目的索引,否则返回-1。
Parameters
info (wx.ListItem) – wx.ListItem object
Return type
long
文档上是这样写的
下列代码是加入表头
self.list = wx.ListCtrl(self, -1, style &