GetTableRowFromLabel
int GetTableRowFromLabel (int panelHandle, int controlID, int beginningRowIndex, int *rowIndex, char label[], int visibleLabelsOnly);
Purpose
Returns the index of the first row with a label matching the specified label.
The function searches the labels you set using the ATTR_LABEL_TEXT row attribute, not the string representations of the numerical indices of the rows, which are the row labels you see by default.
This function returns an index of –1 if the label is not found.
Supported Controls
You can use GetTableRowFromLabel with table controls.
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel. |
controlID | int | 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 functions such as NewCtrl and DuplicateCtrl. |
beginningRowIndex | int | The one-based index of the first row you want the function to search. |
label | char [] | The label you want to locate in the table rows. You can pass an empty string if you want the function to return the index of the first row not containing a label. |
visibleLabelsOnly | int | Specify a nonzero value or select Yes in the function panel to include in the search only rows with visible labels. Specify 0 or select No in the function panel to include in the search rows for which labels are not visible. For the labels to be visible, you must set the row attributes ATTR_USE_LABEL_TEXT and ATTR_LABEL_VISIBLE to TRUE. ATTR_USE_LABEL_TEXT is set to FALSE by default. |
Output | ||
Name | Type | Description |
rowIndex | int | The one-based index of the first row with the specified label. The function searches the labels you set using the ATTR_LABEL_TEXT row attribute, not the string representations of the numerical indices of the rows, which are the row labels you see by default. The function 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: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later