GetIndexFromValue

int GetIndexFromValue (int panelHandle, int controlID, int *index, ...);

Purpose

Returns the zero-based index of the first list item that has the value you specify. The function returns an index of –1 if the value is not found.

Parameters

Input
Name Type Description
panelHandle integer Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID integer The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
itemValue Depends on the type of the control. The value to search for among the list items.
Output
Name Type Description
index integer Returns the zero-based index of the first list item that has the value you specify. Returns –1 if none of the list items have the specified value.

Return Value

Name Type Description
status integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success