Delete item from wxListCtrl

Jude Venn jude-venn at blueyonder.co.uk
Fri Jul 4 17:44:25 EDT 2003


haven't checked, but i think there's a GetIndex() method on the event object that returns the index of the selection.

On Fri, 4 Jul 2003 15:39:20 +0200
"Joost van Rooij" <j.vanrooij_at_e-quest.nl> wrote:

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




More information about the Python-list mailing list