Admin Production ni-theme
Current Publication

GetActiveTableCell

LabWindows/CVI

GetActiveTableCell

int GetActiveTableCell (int panelHandle, int controlID, Point *cell);

Purpose

This function returns the active cell of the specified table control.

Supported Controls

You can use GetActiveTableCell 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.
Output
Name Type Description
cell Point A Point structure indicating the row and column of the active cell.

The Point structure is defined as follows:

typedef struct
   {
   int x;
   int y;
   } Point;


The function writes the one-based column index of the active cell into the x field of the structure, and the one-based row index of the active cell into the y field of the structure.

If the table contains zero rows, the function returns 0 as the row index of the active cell, and if the table contains zero columns, the function returns 0 as the column index of the active cell.

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

Example

Refer to userint\tablecells.cws for an example of using the GetActiveTableCell function.