DlgListBox.FindItem

number DlgListBox.FindItem ( 

number ControlID,

number StartAfter,

string SearchText )

Description

Finds an item in a list box control based on a search string and returns its index.

Note: This action will only work if called from a screen's events and if the named control is on the current screen.

Parameters

ControlID

(number) The numeric ID of the list box control that you want to search.

StartAfter

(number) The index (line number) to start searching after. The search will begin in the next item in the list. You can use an index of -1 to search all list box items. The first list box item has an index of 1.

SearchText

(string) The string of text to search for in the list box control. You can use the * and ? wildcards in this field to search for text that matches a specific pattern.

Returns

(number) The first item index where the search string was found. If the string was not found or an error occurs, the value -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions