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 / Displaying and Scrolling Text


TETextBox

The TETextBox procedure draws the indicated text in a given rectangle with the specified alignment.

PROCEDURE TETextBox (text: Ptr; length: LongInt; box: Rect;
                     align: Integer);
text
A pointer to the text to be drawn.
length
The number of bytes comprising the text.
box
The rectangle where the text is to be drawn. The rectangle is specified in local coordinates (of the current graphics port) and must be at least as wide as the first character drawn. (A good rule of thumb is to make the rectangle at least 20 pixels wide.)
align
The kind of alignment for the specified text.
DESCRIPTION
The TETextBox procedure provides you with an easy way to display static text to a user. It creates its own monostyled edit record, which it deletes when finished with it, so you cannot edit the text it draws. The TETextBox procedure breaks a line of text correctly. You can specify how text is aligned in the box using any of the following alignment constants:
ConstantDescription
teFlushDefaultAligned according to primary line direction
teCenterCentered for all scripts
teFlushRightRight aligned for all scripts
teFlushLeftLeft aligned for all scripts


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996