Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Imperceptus on February 03, 2004, 04:16 PM

Title: List View Remove
Post by: Imperceptus on February 03, 2004, 04:16 PM
When I need to remove something from the listview on an event I am unable to.

I have tried

frmMain.ListView1.ListItems.Remove frmMain.ListView1.FindItem(ItemThatIwantToRemove).Index


My Problem is that I have more then 2 columns on the listview.  It seems that I need to Direct FindItem to look in the SubItems of the Listview but i dont know how to.  
Am I making any sense, or do I need to explain more, Any help would be appreciated.

I have looked across and searched for the answer to this on the forum.
Title: Re:List View Remove
Post by: Lobo on February 04, 2004, 06:48 PM
lstUsers.ListItems.Remove lstUsers.FindItem(ItemThatIwantToRemove).SubItems(Columns index)

Maybe? I don't know just trying to help. Someone else thats better should be able to help you if this was not helpful.
Title: Re:List View Remove
Post by: Mesiah / haiseM on February 04, 2004, 10:16 PM
Are you trying to remove an item based on its subitem value(s)?
Title: Re:List View Remove
Post by: synth on February 09, 2004, 09:17 AM
If I'm not mistaken, he has to find the index number of the listitem name he wants to remove.  ListItems.Remove requires an index number, and doesn't accept a string.
Title: Re:List View Remove
Post by: Grok on February 09, 2004, 11:35 AM

frmMain.ListView1.ListItems.Remove frmMain.ListView1.FindItem(StringToFind, lvwSubItem, , lvwWholeWord).Index