Carbon


TEGetHeight

Header: TextEdit.h Carbon status: Not Recommended

Returns the total height of all of the lines in the text between and including the specified starting and ending lines.

SInt32 TEGetHeight (
    SInt32 endLine, 
    SInt32 startLine, 
    TEHandle hTE
);
Parameter descriptions
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 structure containing the lines of text whose height is to be returned.

function result

The total height of all of the designated text lines.

DISCUSSION

For monostyled text, the TEGetHeight function uses the value of the edit structure’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.

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)