moveCaret
moveCaret(action: Integer; param1: Integer; param2: Integer): Integer;
The moveCaret method of the JadeTextEdit class moves the caret or visible text in the text editor. In the action parameter, use the JadeTextEdit class constants:
-
MVCRT_VIEWCARET (1) to force the caret into view and return zero (0). The values of theparam1 and param2 parameters must be zero (0)
-
MVCRT_VIEWSELECTION (2) to force the start of the selection into view and return zero (0)
-
MVCRT_WORDEND (3) to force the caret to the end of the current word and return the new caret position
-
MVCRT_WORDSTART (4) to force the caret to the start of the current word and return the new caret position
The param1 and param2 parameters are reserved for future use and should be set to zero (0).
The code fragment in the following example shows the use of the moveCaret method.
jteSource.selStart := 5600; jteSource.selLength := 100; jteSource.moveCaret(JadeTextEdit.MVCRT_VIEWSELECTION, 0, 0); jteSource.setFocus(); return;