Spread Windows Forms 11.0 Product Documentation
HideSelection Property (SuperEditBase)
Example 


FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : HideSelection Property
Gets or sets whether selected text loses its highlighting when the control loses focus.
Syntax
'Declaration
 
Public Overridable Property HideSelection As Boolean
'Usage
 
Dim instance As SuperEditBase
Dim value As Boolean
 
instance.HideSelection = value
 
value = instance.HideSelection
public virtual bool HideSelection {get; set;}

Property Value

Boolean value: true to hide the selection highlight when the control loses focus; false otherwise
Remarks

When this property is set to true, selected text does not appear highlighted when the control loses the focus. When this property is set to false, selected text remains highlighted when the control loses the focus.

Note: In some controls, this property is always set to false, or is sometimes overridden and set to false temporarily, due to how the control appears when it is edited. That is, if the control displays its contents in one way when it is being edited, but in another way when it is not in edit mode, it might have this property set to false at all times.

Use this property to indicate whether the selected text is selected while another form or a dialog box has the focus, for example, in a spell-checking routine.

Example
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition;
control.Text = "This is a test for HideSelection";
control.ControlType = FarPoint.Win.ControlType.Normal;
control.SelectionStart = 2;
control.SelectionLength = 5;
control.Selectable = true;
control.HideSelection = false;
control.AutoMenu = true;
textBox1.Text = control.SelectedText();
control.MaxLength = 9;
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition
control.Text = "This is a test for HideSelection"
control.ControlType = FarPoint.Win.ControlType.Normal
control.SelectionStart = 2
control.SelectionLength = 5
control.Selectable = True
control.HideSelection = False
control.AutoMenu = True
TextBox1.Text = control.SelectedText()
control.MaxLength = 9
See Also

Reference

SuperEditBase Class
SuperEditBase Members
CanFocus Property
Enabled Property
Focus Method