From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
The number of selected characters.
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.
On Windows, selecting text via code does not display the text as selected unless the control has the focus. If you want this behavior, call SetFocus before setting the selection.
This example selects the first 10 characters of TextArea1.
TextArea1.SelectionLength = 10