EControl Syntax Editor SDK
TCustomSyntaxMemo.CaretStrPos Property

Indicates the position of the caret in the memo text.

property CaretStrPos: integer;

Use CaretStrPos to determine the caret zero-based position in text. If Caret is out of current line, CaretStrPos will indicate to return character, i.e. to the end of line. 

CaretStrPos can not be greater or equal to TextLength. If Lines property is empty, CaretStrPos will be 0. 


To determine the position of the caret in terms of coordinates in Lines, use the CaretPos property.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!