# SetCursor(r|y:Row, c|x:Col) hash function
Valid for use with hash command: HMI
Arguments may be specified as Name:Value Pairs
Implemented on the following platforms: HMi430, Android, Windows
Sets the cursor for any subsequent Text
to the specified row and column. Row and column are in multiples of the default character size. They both start at 0, so the top lefthand corner of the screen is (0, 0)
In addition to being simple numbers, the row/column coordinates may also be specified in relative or proportional terms. The following table illustrates the possibilities.
Format (example) | As a row specifier | As a column specifier |
---|---|---|
|
Row number 5 from the top, counting from 0. This can be a fractional number such as 5.5 | Column number 5 from the left, counting from 0 |
|
Row 5 from the bottom, counting from 0. This can be a fractional number such as -5.25 | Column 5 from the right, counting from 0 |
|
The top character row | The left-most character column |
|
The bottom character row | The right-most character column |
|
One quarter of (0.25 times) the screen height from the top. Fractional number between -1 and +1 are interpreted as a fraction of the screen. | One quarter of the screen width from the left. |
|
One quarter of the screen height from the bottom. | One quarter of the screen width from the right. |
|
The top-bottom centre of the screen. | The left-right centre of the screen. |
|
Five character rows down from the centre | Five character widths right from the centre. |
|
Five character rows up from the centre | Five character width left from the centre. |
|
One quarter character row down from the centre. After a "C" all numbers are interpreted as multiples of the character pitch. | One quarter character width right from the centre. |
|
Three and a quarter character rows up from the centre. After a "C" all numbers are interpreted as multiples of the character pitch. | Three and a quarter character widths left from the centre. |
Example:
# HMI Cursor(r:0, c:-3) Print(f(fCounter,4,0))
Display fCounter
in the top righthand corner in a field 4 characters wide, with no decimal places . Remember, -0
gives the far right character position, -1
the second character in (space for 2 characters), etc.