CARET_POSITION

CARET_POSITION N,P

PUT THE CARET OF THE SYSTEM OBJECT NUMBER N TO THE POSITION P

  • Type: Command
  • Parameters: 2
  • Group: System Objects

ACTION

The command CARET_POSITION N,P put the caret at position P (that is after the P-th character) in the system object number N.

The system object is an EDIT, a MEMO, a COMBO or a SPIN.

SYNTAX: CARET_POSITION N,P

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • P = position of the caret.

USE

  • The command CARET_POSITION is used to position the caret in an EDIT, a MEMO, a COMBO or a SPIN.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If number N is not the number of an EDIT, a MEMO, a COMBO or a SPIN.
  • If P is not a correct expression.
  • If P is less than 0.

EXAMPLE

rem create an EDIT

edit 1

rem display a text

text 1,"Hello"

rem put the caret between "e" and "l"

set_focus 1

caret_position 1,2

SEE ALSO

EDIT

MEMO

COMBO

SPIN