selectionStyle

Type: Integer

Availability: Read or write at any time

The selectionStyle property determines whether selected text in a TextBox or JadeRichText control remains highlighted when a control loses and gains the focus.

For the JadeEditMask control, this property determines whether a text box portion of the edit mask control that receives focus is selected.

The settings of the selectionStyle property for the TextBox and JadeRichText classes are listed in the following table.

TextBox Class Constant Value Description
SelectionStyle_Retain 0 Selected text appears selected when the control loses the focus (the default).
SelectionStyle_Hide 1 Selected text does not appear selected when the control loses the focus. If the text box gains focus by means other than a mouse click, the selected text display is restored.
SelectionStyle_SelectAll 2 All text in the control is automatically selected when the control gains the focus by means other than a mouse click. The data entry position (the | vertical bar) is located after the last character of the text. When focus is lost, the selection display is removed.
SelectionStyle_SelectAllAlways 3 For the TextBox control only, the entire text is selected, regardless of how the focus was achieved when the text box gains focus (by logic, the mouse, or keyboard). The data entry position (the | vertical bar) is located after the last character of the text. When focus is lost, the selection display is removed.

Use the selectionStyle property to indicate which text is selected while another form or control has the focus or when the text box gains the focus by means other than a mouse click. Changing this value at run time causes the text box to be recreated in the new style. The text is retained, but other runtime attributes (for example, the selText property) are reset.

The settings of the selectionStyle property for the JadeEditMask class are listed in the following table.

Constant Value Description
SelectionStyle_None 0 Text box portion of the edit mask is not selected (default value).
SelectionStyle_Select 1 Text box portion of the edit mask control that receives focus is selected, except when using the mouse to gain focus.
SelectionStyle_Select_Always 2 Entire text box portion of the edit mask control that receives focus is selected, regardless of how the focus was achieved when the text box gains focus (by logic, the mouse, or keyboard). The data entry position (the | vertical bar) is located after the last character of the text. When focus is lost, the selection display is removed