int GetTableSelection (int panelHandle, int controlID, Rect *cellRange);
Returns the cells in the current cell selection.
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. |
Output | ||
Name | Type | Description |
cellRange | Rect (passed by reference) | A Rect structure containing the location and size of the current cell selection. The Rect structure is defined as follows: typedef struct { int top; int left; int height; int width; } Rect; The function writes the one-based row and column indices of the first cell in the selection into the top and left fields of the structure, respectively. The function writes the number of columns in the selection into the width field of the structure, and it writes the number of rows in the selection into the height field of the structure. The function returns an empty rect (VAL_EMPTY_RECT) if the cell selection is empty (the default state). Note that the table selection is distinct from the active cell, and whereas there always exists an active cell (i.e. the cell holding the keyboard focus), the selection consists of a rectangular cell range that can be empty. The only relationship between the active cell and the selection is that, if the selection is non-empty, the active cell is always contained within the selection |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|