int SetTableSelection (int panelHandle, int controlID, Rect cellRange);
Sets the cell selection of the specified table control.
If you set the cell selection to be nonempty, the table control sets its active cell to be the first cell in the new 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. |
cellRange | Rect | A Rect structure specifying the new cell selection range. The Rect structure is defined as follows: typedef struct { int top; int left; int height; int width; } Rect; Pass the one-based row and column indices of the first cell in the selection as the top and left fields of the structure, respectively. Pass the number of columns in the selection as the width field of the structure, and the number of rows in the selection as the height field of the structure. If you want the selection to be empty, pass 0 as the width or the height. The macro VAL_EMPTY_RECT is convenient for this. The empty selection is the default state. You can create a Rect without declaring a variable by using the following function: Rect MakeRect (int top, int left, int height, int width); ExampleSetTableSelection (panelHandle, controlID, MakeRect (2, 3, 5, 5)); |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|