setcursor

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]]");
    
    
Note: When used with the table command, the column must always be listed before the row as in the previous example. In addition, the setcursor command will not work for any row other than the first if the table is empty.

Options

The setcursor command takes the following options.

offset

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}
Note: The offset option can only be used with a field name - it doesn't work with field coordinates. The offset option also does not work on table cells.