Unit 'StdCtrls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#lcl]


Clears the current text selection in the edit control.


Source position: stdctrls.pp line 846

public procedure TCustomEdit.ClearSelection; virtual;


ClearSelection is a procedure used to clear the currently selected text in the edit control. ClearSelection sets the value in SelText to an empty string ('') to discard selected value in the edit control. It does not affect the values in the Text property.

No actions are performed in the method when SelLength contains 0 (zero).

Use HideSelection to disable text selection in the edit control.

See also



The currently selected text in the edit box for the control.



The zero-based index for the first UTF-8 character in the current text selection.



The number of currently selected UTF-8-encoded characters in the control.



Determines if selected text to be hidden when the control does not have focus.

CT Web help

CodeTyphon Studio