[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomMemo.SetCaretPos

Sets the position for the editing cursor or caret to the specified location.

Declaration

Source position: stdctrls.pp line 921

protected procedure TCustomMemo.SetCaretPos(

  const AValue: TPoint

); override;

Arguments

AValue

  

New position for the editing cursor or caret.

Description

SetCaretPos is an overridden method in TCustomMemo used to set the position for the editing cursor (or caret).

AValue is a TPoint instance with the character and line coordinates for the editing cursor. The X member contains the 0-based relative column offset to the UTF-8-encoded character where the caret is positioned. 0 is immediately before the first character in the current line of text. The Y member contains the 0-based offset to the line where the caret is positioned.

SetCaretPos ensures that the widgetset class is cast to a TWSCustomMemoClass instance, and calls its SetCaretPos method.

See also

TCustomEdit.SetCaretPos

  

Sets the value for the CaretPos property.


Version 4.0 Generated 2025-05-03 Home