EControl Syntax Editor SDK
TCustomSyntaxMemo.SelStart Property

Specifies the position of the first selected character in the text.

property SelStart: Integer;

Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Setting SelStart moves the current selection to new position. 

Do not use SelStart to get or set caret position like in standard TMemo, instead use CaretStrPos property. 

SelStart is valid only when SelectMode is not msColumn. 


To select a particular range of text, first set SelStart to position the cursor, and then set SelLength to extend the selection.

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