Carbon


TEInsert

Header: TextEdit.h Carbon status: Not Recommended

Inserts the specified text immediately before the selection range or the insertion point in the text of the designated edit structure, redrawing the text as necessary.

void TEInsert (
    const void *text, 
    SInt32 length, 
    TEHandle hTE
);
Parameter descriptions
text

A pointer to the text to be inserted.

length

The number of characters to be inserted.

hTE

A handle to the edit structure containing the text buffer into which the new text is to be inserted.

DISCUSSION

When you call the TEInsert function and a range of text is selected, TEInsert doesn’t affect the selection range. The TEInsert function does not check for a 32 KB limit, so your application must ensure that the inserted text does not exceed this text size limit of 32 KB. The TEInsert function recalculates line starts and line heights to adjust for the inserted text.

AVAILABILITY

Not recommended in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)