TcxCustomTextEdit.SetSelection(Integer,Integer) Method
Sets the text selection within a text editor.
Declaration
procedure SetSelection(ASelStart: Integer; ASelLength: Integer);
Parameters
Name | Type |
---|---|
ASelStart | Integer |
ASelLength | Integer |
Remarks
Each text editor allows a user to select any portion of text using the cursor keys. The selected characters are highlighted and can be copied by Ins key to clipboard, deleted by Del key or replaced by another character entered. You can use the SetSelection method to set the text selection within a text editor. SetSelection sets the SelStart and SelLength properties to values passed as ASelStart and ASelLength parameters respectively. This sets the selection for the text portion starting from the ASelStart position. The ASelLength parameter specifies the number of characters to select. Setting ASelLength to 0 removes the selection.
To select all the text, use the SelectAll method.
See Also