Explaining the setcursor command.
The setcursor command can be used to place the cursor into an inputfield, a table cell or a position on a list of your choice. There are several possible syntaxes for the setcursor command which are as follows:
| Syntax | Description |
|---|---|
| setcursor([row,col]); | Sets the cursor into a field specified by the included coordinates. |
| setcursor("F[Name]"); | Sets the cursor into a specified inputfield. |
| setcursor("cell[tableName, col, row]"); | Sets the cursor into a specified cell in a table. |
When you use setcursor on a table cell, the column can be identified either by the column number or by the column name as in the following examples:
setcursor("cell[Data Entry Area, 5, 10]");
setcursor("cell[Data Entry Area, Subobject, 4]");
In addition, the row number can be specified by a variable as in the following example:
znum = 1;
setcursor("cell[Data Entry Area, 3, &V[z_num]]");
The setcursor command takes the following options.
The offset option will offset the cursor from the left margin of the field in which it will be placed. The syntax is as follows, with 'x' being replaced by a number:
{"offset":x}