Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 2 - TextEdit / TextEdit Reference
Routines / Setting the Caret and Selection Range


TESetSelect

The TESetSelect procedure sets the selection range within the text of the specified
edit record.

PROCEDURE TESetSelect (selStart, selEnd: LongInt; hTE: TEHandle); 
selStart
The byte offset at the start of the text selection range.
selEnd
The byte offset at the end of the text selection range.
hTE
A handle to the edit record.
DESCRIPTION
The TESetSelect procedure removes highlighting of the old selection range and highlights the new one. If selStart equals selEnd, the new selection range is an insertion point, and a caret is displayed. If selEnd is anywhere beyond the last character of the text, TESetSelect uses the first position past the last character. The selEnd and selStart fields can range from 0 to 32767.

SPECIAL CONSIDERATIONS
When only the Roman script system is used, the selection range is always displayed and highlighted as a continuous range of text. However, when one or more script systems requiring mixed-directional display of text are installed, a continuous sequence of characters in memory may appear as a discontinuous selection when displayed.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996