0
我使用此代码更新列上的记录,但我无法更新第二和第三列。 我跟着这个link,它正在工作,但没有与我的代码。wxpython:无法更新列
self.m_listCtrl3 = wx.ListCtrl(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LC_ALIGN_TOP|wx.LC_ICON|wx.LC_REPORT )
self.m_listCtrl3.InsertColumn(0, "c1", width=-1)
self.m_listCtrl3.InsertColumn(1, "c2", width=-1)
self.m_listCtrl3.InsertColumn(2, "c3", width=-1)
bSizer15.Add(self.m_listCtrl3, 1, wx.ALL|wx.EXPAND, 5)
self.m_listCtrl3.InsertStringItem(0,"Pankaj")
self.m_listCtrl3.SetStringItem(0,1,"Somesh")
self.m_listCtrl3.SetStringItem(0,1,"Punit")
这我得到的输出是:
由于现在是工作的罚款。但我应该怎么做,如果我想在第一列添加图标。 –
查看wxPython Demo包中的代码,ListCtrl演示,它在那里 –