Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Delete item from wxListCtrl

Thread Tools

Delete item from wxListCtrl

Joost van Rooij
Posts: n/a

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()

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?


Reply With Quote
Joost van Rooij
Posts: n/a

"Jude Venn" <(E-Mail Removed)> wrote in message

> 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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
properly delete item during "for item in..." Ratko Python 7 07-17-2008 07:56 PM
Help! acts_as_nested_set Administration (add new item, delete item) Namor Ruby 0 01-19-2006 08:26 AM
wxPython: combining wxListCtrl and wxCheckBox Mark Carter Python 1 12-01-2003 04:21 PM
Trouble with wxListCtrl chauhan Python 1 09-22-2003 07:34 PM
How do I get more events from a wxListCtrl in a panel? Python 1 07-22-2003 09:13 PM