Delete item from wxListCtrl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joost van Rooij

    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.Delet eItem(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

    #2
    Re: Delete item from wxListCtrl


    "Jude Venn" <jude-venn@blueyonder .co.uk> wrote in message
    [color=blue]
    > haven't checked, but i think there's a GetIndex() method on the event[/color]
    object that returns the index of the selection.[color=blue]
    >[/color]

    Yep, I tested it, and it worked!
    thanx a lot!


    Comment

    Working...