Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SeventeenApplication Integration Functions (continued)

EditWindowSetCaret Function

Overview

The EditWindowSetCaret function directly sets the caret position for an edit window.

Syntax/Parameters

Syntax

int = EditWindowSetCaret ( handle hwView, int x, int y, [int mode] );

Parameters

hwTarget

A handle specifying the edit view. The request is sent directly to the window.

x  y

A pair of int values specifying the new zero-based position of the caret. For text style (including HTML) files, the X position will native (tabs not expanded). For spreadsheet based views, x and y specify the column and row. For some views, the position may be altered once set to adjust to a valid display position. For example, when positioning Page View, the caret must be on PCDATA (text).

mode

An optional int value specifying the positioning mode for the viewport. The default is to not reposition or ESCP_VIEWPORT_AUTO.

Return Value

An int as ERROR_NONE or a formatted error code on failure. A bad window handle or specifying a window that does not support the function will result in an error.

Remarks

The specified x and y positions must be within the range of the file or edit window. The viewport positioning modes are as follows:

ESCP_NO_VIEWPORT

Do not adjust yiewport. If the caret is off, the viewport will not be scrolled. In some views such as Page View, the caret will not be rendered in position if the viewport is not adjusted.

ESCP_VIEWPORT_AUTO

Automatically positions viewport. Positioning depends on the view but the caret will be brought into view somewhere on the screen.

ESCP_VIEWPORT_CENTER

Force to center of viewport.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic