Combo_GetIndexFromValue
- Updated2023-02-21
- 6 minute(s) read
int Combo_GetIndexFromValue (int panelHandle, int controlID, int *index, const char *itemValue);
Purpose
Returns the index of the first Combo Box item with the specified value.
Returns an index of -1 if the value is not found.
Parameters
| Input | ||
| Name | Type | Description |
| panelHandle | int | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
| controlID | int | The defined constant (located in the UIR header file) that was assigned to the original string or the ID returned by the Combo_NewComboBox function. |
| itemValue | const char * | Specifies the value whose index will be returned. |
| Output | ||
| Name | Type | Description |
| index | int | Returns the index of the first Combo Box item with the specified value. Returns an index of –1 if the value is not found. |
Return Value
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|
Additional Information
Library: Combo Box
Include file: custctrl\combobox.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later
Example
Refer to userint\activex\WebBrowser.cws for an example of using the Combo_GetIndexFromValue function.