Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Delete item from wxListCtrl

 
 
Joost van Rooij
Guest
Posts: n/a
 
      07-04-2003
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


 
Reply With Quote
 
 
 
 
Joost van Rooij
Guest
Posts: n/a
 
      07-07-2003

"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
 
 
 
Reply

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? bmoore@integrian.com Python 1 07-22-2003 09:13 PM



Advertisments