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 / Checking, Setting, and Replacing Styles


TEGetStyleScrapHandle

The TEGetStyleScrapHandle function creates a style scrap record, copies the character attributes associated with the current selection range into it, and returns a handle to it.

FUNCTION TEGetStyleScrapHandle (hTE: TEHandle): STScrpHandle;
hTE
The handle to the edit record containing the text selection range whose character attributes are to be copied.
DESCRIPTION
The TEGetStyleScrapHandle function creates a style scrap record of type StScrpRec and copies the character attributes associated with the current selection range of the designated edit record into it. If the current selection range is an insertion point, TEGetStyleScrapHandle first checks the null scrap. If the null scrap contains character attributes, they are written to the newly created style scrap record. If the null scrap is empty, the attributes associated with the character preceding the insertion point are copied to the style scrap record.

The TEGetStyleScrapHandle function has no impact on the Scrap Manager's desk scrap. The TEGetStyleScrapHandle function returns a NIL value if called with a handle to a monostyled record.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996