Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Delete item from wxListCtrl (http://www.velocityreviews.com/forums/t319247-delete-item-from-wxlistctrl.html)

Joost van Rooij 07-04-2003 01:39 PM

Delete item from wxListCtrl
 
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



Joost van Rooij 07-07-2003 07:14 AM

Re: Delete item from wxListCtrl
 

"Jude Venn" <jude-venn@blueyonder.co.uk> 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!




All times are GMT. The time now is 03:09 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.