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
 
Ad

Advertisements

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

Top