Applies to
Declaration
property SelCol: Cardinal;
property SelLine: Integer;
property SelPar : Integer;
property SelStart: Integer;
Description
With these properties you can get the actual line number and column number of the caret (the current editing place), the current paragraph number, or the offset relative to the start of the text. All of these properties are zero based. Writing to them permits setting the editing place from your application.
When setting SelCol to a value greater than the number of characters in the current line, the caret will be placed right after the last character of this line. When writing to SelPar, the caret will be placed at the start of the designated paragraph.
Note that the selection becomes empty when writing to SelCol, SelLine, SelPar or SelStart. In particular, writing to SelLine will put the editing point at the start of designated line, and the selection length becomes zero. Similarly, writing to SelPar will put the editing point at the start of designated paragraph and the selection length becomes zero. You control the length of the selection with the property SelLength after having assigned to SelCol, SelLine, SelPar or SelStart.
All these properties are run time only, with read and write access.
Note
SelStart and SelLength behave slightly differently from the similarly named properties of Delphi's native TMemo: in TPlusMemo, SelStart always indicates the current position of the caret (or "editing point"). If the caret is at the end of selection, SelLength will be negative and SelStart will be greater than the position where the selection starts, contrarily to TMemo.