Delete item from wxListCtrl

  • Thread starter Joost van Rooij
  • Start date
J

Joost van Rooij

Hi,

I am having problems deleting one item from a list in a wxListCtrl widget.
My thought was to select it as presented below:

def onSelect(self, event):
self.item = event.GetItem()
self.list.DeleteItem(self.item)

This won't work, it appaers GetItem() is returning an object while
DeleteItem() requires a long as its input. How do I pass the item to the
DeleteItem function?

Regards,
Joost
 
J

Joost van Rooij

Jude Venn said:
haven't checked, but i think there's a GetIndex() method on the event
object that returns the index of the selection.
Yep, I tested it, and it worked!
thanx a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top