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.

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.
beginningRowIndex integer 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 integer Set visibleLabelsOnly to FALSE if you want the function to include rows for which the 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 Integer (passed by reference) 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 integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success