FMX.Memo.TCustomMemo.SelLength
Delphi
property SelLength: Integer read GetSelLength write SetSelLength;
C++
__property int SelLength = {read=GetSelLength, write=SetSelLength, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Memo.pas FMX.Memo.hpp |
FMX.Memo | TCustomMemo |
Description
Specifies the number of characters that are selected in the memo control.
Read SelLength to determine the length, in characters, of the selected text.
Set the value of the SelLength property in order to specify the length of the selected text, starting at SelStart. Keep in mind that the character count from SelLength will include end-of-line characters at the end of each line.
To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection. The memo component must have focus (call SetFocus) before you attempt to use SelStart; otherwise the selection is invisible.
Note: Setting SelLength to a value greater than the number of characters from SelStart to the end of the text results in the selection of all characters from SelStart to the end of the text. Reading SelLength immediately after setting it to a value greater than the number of available characters returns the number of characters actually selected, not the value that was just set.