Home > Language Reference > Classes > ChoiceControl

FindString Method

Finds an item in a list from its caption.

Syntax

Public Function FindString(ByRef sValue As String, ByVal eCase As HbCompare) As Integer

ParameterDescription
sValueString to find.
eCaseCase sensitivity.

Remarks

The FindString finds the first item in the list whose caption is sValue. The returned value can be used, for exemple, to select the found item using the ListIndex property. If no item matches the search, the returned value is -1.

The eCase parameter specifies whether the comparison is case sensitive or not and can be one of the following two values:

ConstantValueDescription
hbCompareBinary&H0000The search is case sensitive.
hbCompareText&H0001The search is not case sensitive.

You can also find an item from its associated value using the FindItemData function.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A