This method finds and returns a reference to a ListItem object in a ListView control.
listview.FindItem (string, [value], [index], [match])
Constant |
Value |
Description |
lvwText | 0 | (Default) Matches string with a ListItem object's Text property. |
lvwSubitem | 1 | Matches string with any string in a ListItem object's SubItems property. |
Constant |
Value |
Description |
lvwWholeWord | 0 | (Default) An integer or constant specifying that a match will occur if the item's Text property begins with the whole word being searched. Ignored if the criteria is not text. |
lvwPartial | 1 | An integer or constant specifying that a match will occur if the item's Text property begins with the string being searched. Ignored if the criteria is not text. |
Returns the first ListItem that matches all the search criteria.
If you specify lvwText as the search criteria, you can set the match to lvwPartial. This setting ensures that a match occurs when the Text property of the ListItem object begins with the string you are searching for.