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


TEStyleInsert

The TEStyleInsert procedure inserts the specified text immediately before the selection range or the insertion point in the edit record's text and applies the specified character attributes to the text, redrawing the text if necessary.

PROCEDURE TEStyleInsert (text: Ptr; length: LongInt; 
                         hST: STScrpHandle; hTE: TEHandle);
text
A pointer to the text to be inserted.
length
The length in bytes of the text to be inserted.
hST
A handle to the style scrap record containing the character attribute information to be applied to the inserted text.
hTE
A handle to the edit record into which the text is to be inserted.
DESCRIPTION
You should create your own style scrap record, specifying the character attributes to be inserted and applied to the text, and pass its handle to TEStyleInsert as the value of the hST parameter. The character attributes are copied directly into the style record's (TEStyleRec) style table.

The TEStyleInsert procedure does not affects the current selection range.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996