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


TEGetHeight

The TEGetHeight function returns the total height of all of the lines in the text between and including the specified starting and ending lines.

FUNCTION TEGetHeight (endLine, startLine: LONGINT; 
                      hTE: TEHandle): INTEGER;
endLine
The number of the last line of text whose height is to be included in the total height. You can specify a value that is greater than or equal to 1 for this parameter.
startLine
The number of the first line of text whose height is to be included in the total height. You can specify a value that is greater than or equal to 1 for this parameter.
hTE
A handle to the edit record containing the lines of text whose height is to be returned.
DESCRIPTION
For monostyled text, the TEGetHeight function uses the value of the edit record's lineHeight field. For multistyled text, it uses the line height element (LHElement) of the line height table (LHTable). Note that TEGetHeight does not take into account
the height of any blank lines at the end of the text. You need to consider this
when scrolling text.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996