findString

findString(startIndx: Integer;
           str:       String): Integer;

The findString method of the ListBox class or ComboBox class searches the entries in a list box or combo box control for an entry with the string specified in the str parameter.

The search is not case-dependent. The findString method matches any entry with the specified string prefix.

The search starts with the value specified in the startIndx parameter and returns the next found entry in the list. If no matching entry is located, it returns -1.

The method in the following example shows the use of the findString method.

textBoxLeftStart_change(textbox: TextBox input) updating;
vars
    count : Integer;
begin
    count := listBoxLeft.findString(1, textBoxLeftStart.text);
    if count <> -1 then
        listBoxLeft.topIndex := count;
    endif;
end;