Sign in Join
FPDoc Onlineexperiment

TCustomEdit.AutoSelect property

Member of TCustomEditprotectedIn unit StdCtrls

Enables auto-selection of text when focused.

Declaration

pascal
property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;

Description

AutoSelect is a Boolean property which enables or disables auto-selection of text when the control receives focus. If True, the edit control will select all its text when it receives focus or when the Enter key is pressed. The default value for the property is True.

AutoSelect is used in the KeyUpAfterInterface method, and determines if the SelectAll method is called when editing is completed in the control. It is used in MouseUp to determine if SelectAll is called when the Left mouse button is clicked. It is also used in DoEnter to determine if SelectAll is called when the Enter key is pressed.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.