selLength

Type: Integer

Availability: Not available at design time, read or write at run time

The selLength property contains the number of characters selected in a ComboBox, TextBox, JadeRichText, or JadeTextEdit control. Use the selLength property for tasks such as setting the insertion point, establishing an insertion range, selecting substrings in a control, or clearing text.

The valid range of settings is zero (0) through text length (the total number of characters in the edit area of the control). The result of setting the value of the selLength property to a value less than zero (0) is undefined.

Changing the value of the selStart property changes the selection to an insertion point and sets the value of the selLength property to zero (0). Setting the selText property to a new value sets the selLength property to zero (0) and replaces the selected text with the new string.

If the value of the selStart property is zero (0) and the value of the selLength property is -1, all text in the control is selected. If the value of the selStart property is -1, any current selection is deselected.

For the JadeTextEdit class, the EVENTTYPE_SELECTIONSTATE notification occurs when the selection changes from empty or to empty.