- for x in range(len(items)):
- key, data = items[x]
- self.list.InsertImageStringItem(x, data[0], self.idx1)
- self.list.SetStringItem(x, 1, data[1])
- self.list.SetStringItem(x, 2, data[2])
- self.list.SetItemData(x, key)
+ for key, data in items:
+ index = self.list.InsertImageStringItem(sys.maxint, data[0], self.idx1)
+ self.list.SetStringItem(index, 1, data[1])
+ self.list.SetStringItem(index, 2, data[2])
+ self.list.SetItemData(index, key)