• Welcome to Valhalla Legends Archive.
 

List View Remove

Started by Imperceptus, February 03, 2004, 04:16 PM

Previous topic - Next topic

Imperceptus

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.
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

Lobo

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.
Look it's a signature.

Mesiah / haiseM

Are you trying to remove an item based on its subitem value(s)?
]HighBrow Innovations
Coming soon...

AIM Online Status: 

synth

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.

Grok

#4

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