BaseListBox.FindItem Method | |
Search a list box for a specified string, and return the location of the first item in the list box that matches it.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD FindItem(
cItem,
lWholeItem,
nStart
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual FindItem(
Usual cItem = default,
Usual lWholeItem = default,
Usual nStart = default
)
Request Example
View SourceParameters
- cItem (Optional)
- Type: Usual
The text to search for. - lWholeItem (Optional)
- Type: Usual
Indicates how the search is to be performed. TRUE matches an exact cItem string to a 'whole' list box item (for example, a 'can' string does not match 'scan'). FALSE finds a match for any list box prefixed by cItem (for example, the string 'cat' would match 'catalog' in the list box). The default is TRUE.
- nStart (Optional)
- Type: Usual
Specifies the one-based index of the item before the first item to be searched. When the search reaches the bottom of the list box, it continues searching from the top of the list box back to the item specified by the nStart parameter. If nStart is 0, the entire list box is searched from the beginning.
Return Value
Type:
Usual
The position of the first item that contains the matching text, if a match is found (a value of 1 refers to the first position in the list box); if no match is found, 0 is returned.
For example, if
cItem matched the fifth string in the list box, the return value would be 5. This means that no earlier string in the list box matched it.
See Also