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


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


Source position: stdctrls.pp line 865

public property TCustomEdit.HideSelection : Boolean
  read FHideSelection
  write SetHideSelection
  default True;


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



The text displayed and edited for the control.



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.



Clears the current text selection in the edit control.



Ensures the required creation parameters are set for handle creation.

CT Web help

CodeTyphon Studio