TextEdit.SelectionLength
From Xojo Documentation
Property (As Integer )
aTextEdit.SelectionLength = newIntegerValue
or
IntegerValue = aTextEdit.SelectionLength
New in 2019r2
Supported for all project types and targets.
or
IntegerValue = aTextEdit.SelectionLength
New in 2019r2
Supported for all project types and targets.
The number of selected characters.
Notes
A SelectionLength of 0 means an insertion point rather than a selection. A value greater than the number of characters in the control means that the selection is from SelectionStart to the end of the control.
Example
This example selects the first 10 characters of TextArea1.
TextArea1.SelectionStart = 0
TextArea1.SelectionLength = 10
TextArea1.SelectionLength = 10