HideSelection Property (ATextBox)

Returns and sets whether the selected text appears highlighted when the ATextBox control does not have focus.

Syntax

Object.HideSelection [ = bHideSelection ]

The HideSelection property syntax has the following parts:

 

Name

Type

Description

Object

ATextBox

ATextBox control

bHideSelection

Bool

A boolean expression that specifies whether the selected text appears highlighted when the control does not have focus.

Where

bHideSelection can be one of the following:

 

Value

Description

True *

The selected text of the control will not be highlighted when the control lacks focus. When the control receives focus again, the selected text will not be highlighted.

False

The selected text of the control will remain highlighted when the control lacks focus and will be highlighted when the control receives focus again.

Comments

Normally, an edit control hides the selection when the control loses the input focus and restores the selection when the control receives the input focus again. Setting this property to True will hide the selection when the control loses focus and will not restore the selection when the control receives the input focus again. Setting it to False will retain the selection even if the control loses focus.

This property can be set at design time as well as at run time.

Example

The following statement returns whether the selected text appears highlighted when the text box control does not have focus:

if tbDesc.HideSelection=False

print "not showing selection when focus is not here"

! set its property to True
tbDesc.HideSelection=True

endif

Applies to

ATextBox

See Also

Locked, ScrollBars