Carbon


TESetText

Header: TextEdit.h Carbon status: Not Recommended

Incorporates a copy of the specified text into the designated edit structure.

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

A pointer to the text to be copied and incorporated.

length

The number of characters in the text to be incorporated.

hTE

A handle to the edit structure into which the text is to be copied.

DISCUSSION

The function TESetText lets you incorporate existing text into the text buffer of an edit structure. The function copies the specified text into the existing hText handle of the edit structure, resizing the buffer, if necessary; it doesn’t bring in the original text. The copied text is wrapped to the destination rectangle, and its lineStarts and nLines fields are calculated accordingly. The selection range is set to an insertion point at the end of the incorporated text. The TESetText function does not display the copied text on the screen. To do this, call TEUpdate.

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)