TCustomEdit.HideSelection property
Determines if selected text to be hidden when the control does not have focus.
Declaration
property HideSelection: Boolean read FHideSelection write SetHideSelection default True;Description
HideSelection is a
Boolean property which determines
whether the selected text in the control is hidden when the control does not
have focus.
HideSelection negates the default behavior in the edit control. The default behavior hides the selection when the control loses focus, and displays the text selection when the control receives focus. When set to False, the selected text (if any) is always displayed in the selected state - even when the control loses focus.
The default value for the property is True.
Changing the value for the property causes the SetHideSelection
method in the widgetset class to be called when its handle has been
allocated. No actions are performed in the method when the handle has not
been allocated for the widgetset class.
The value in HideSelection is used in the CreateParams method to
determine whether the ES_NOHIDESEL edit style flag is included in
or omitted from the creation parameters for the control. When HideSelection
is set to False, the ES_NOHIDESEL edit style is included in the flag
values.
Use SelText, SelStart, and SelLength to change the text selection in program code. Use ClearSelection to remove the current text selection in the edit control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
