2

I have a list generated using wxListCtrl where it has three coloumns. The data generated when the list updates is in need to use in the other part of my code.Can any one please tell me how could i get the all values of an item of all 3 coloumns in the list? My list is as below...

self.list_ctrl = wx.ListCtrl(self.panel, size=(565,150),pos=(15,20),style=wx.LC_REPORT | wx.BORDER_SUNKEN)
self.name=self.list_ctrl.InsertColumn(0, 'Task Name',width=189)
self.date=self.list_ctrl.InsertColumn(1, 'Run ',width=189)
self.status=self.list_ctrl.InsertColumn(2, 'Status', width=187
self.index=0

where the items are generated using..

Taskname=self.list_ctrl.InsertStringItem(self.index,task)
Taskdate=self.list_ctrl.SetStringItem(self.index, 1,strftime("%d-%m-%Y", gmtime()))
Tasktime=self.list_ctrl.SetStringItem(self.index,2,datetime.now().strftime('%H:%M:%S'))

I can able to get the name of the item i.e, 'self.name' which is under 1st coloumn using

name=self.list_ctrl.GetItemText(self.name)

But 'self.date' and 'self.time' are returning the int type values.How can i get the date and time in the variable 'Taskdate' and 'Tasktime' respectively?

4

1 に答える 1