SPLat Logo

# SetCursor(r|y:Row, c|x:Col) hash function

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map
SPLat will be shut down for the Christmas Holiday season from Friday 20 December 2024 through Tuesday 7 January 2025. We will check emails periodically and will continue to process orders but at a slower pace. Santa hat

# 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

5

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

-5

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

0

The top character row The left-most character column

-0

The bottom character row The right-most character column

0.25

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.

-0.25

One quarter of the screen height from the bottom. One quarter of the screen width from the right.

C

The top-bottom centre of the screen. The left-right centre of the screen.

C+5

Five character rows down from the centre Five character widths right from the centre.

C-5

Five character rows up from the centre Five character width left from the centre.

C+.25

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.

C-3.25

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.