Hello,
A search through Google and the archives here returned nothing.
Is it possible to edit items in a listbox, either through wx.ListBox or the wx.ItemContainer? I’d like to append something to the strings as I perform a task in a loop:
items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
for item in items:
#do something
#modify string in listbox
Cheers,
–
Edit: Unless there’s a way to get the item’s position in the original list, I’ll increment my own counter and use the SetString() method:
items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
index = 0
for item in items:
#do stuff
self.lb1.SetString(index, f"{item} DONE")
index += 1