User Guide

984 Chapter 14: Properties
Example
The following statement sets the selection displayed by the sprite of text member myAnswer so
that characters 6 through 10 are highlighted:
member("myAnswer").selection = [6, 10]
See also
color(), selStart, selEnd
selEnd
Usage
-- Lingo syntax
selEnd
// JavaScript syntax
selEnd;
Description
Cast member property; specifies the last character of a selection. It is used with selStart
to identify a selection in the current editable field, counting from the beginning character.
This property can be tested and set. The default value is 0.
Example
These statements select “cde” from the field “abcdefg”:
-- Lingo syntax
selStart = 3
selEnd = 5
// JavaScript syntax
selStart = 2;
selEnd = 4;
This statement makes a selection 20 characters long:
-- Lingo syntax
selEnd = selStart + 20
// JavaScript syntax
selEnd = selStart + 20;
See also
editable, hilite (command), selection() (function), selStart, text