Action Statement
Change the cell cursor to a different cell.
change TABLE_NAME cursor {by XOFFSET YOFFSET | to X Y}
TABLE_NAME
The identifier for a table.
by XOFFSET YOFFSET
The change in the column and row position, respectively.
to X Y
Integer values indicating the new desired position of the cursor within the table, in columns and rows.
Description
Use this statement to change the cell cursor to a different cell in a table. This does not scroll the table, even if the new position is not in the current window. Invisible columns are counted when using the XOFFSET. However, you cannot set the cursor to an invisible column. In addition, the parent of the table may not be temporary and invisible when you issue this statement or it will be ignored.
Example
# When double click on a cell, if not readonly, edit it or
# toggle it.
if (xcoord != 0 and ycoord != 0) then
if (xcoord != xcursor of object or ycoord != ycursor of object) then
# This would only happen if the user double-clicked on a
# column resize line at a different location than the cell
# cursor, so go there first
change Table_TBL cursor to (xcoord) (ycoord)
end if
end if
See Also
change window position Action Statement
change window position to cursor Action Statement
top of, bottom of, right of, and left of Built-in Functions
xcursor of and ycursor of Built-in Functions