Previous: Stretch procedure To the Table of Content Next: TextWidth function

- 4.37.2.122 -
Standard Units
Graph Unit
Graph Unit Procedures and Functions

TextHeight function

Targets: MS-DOS, Win32


Graph Unit

Returns the height of a string, in pixels.

Declaration:
function TextHeight(TextString: string): DWORD;
Remarks:
Takes the current font size, and determines the height of the TextString in pixels. This is useful for adjusting the spacing between lines, computing viewport heights, sizing a title to make it fit on a graph or in a box, etc.

It is important to use TextHeight to compute the height of strings, instead of doing the computation manually. In that way, no source code modifications have to be made when different fonts are selected.


Previous: Stretch procedure To the Table of Content Next: TextWidth function
Stretch procedure Table of Content TextWidth function

- 4.37.2.122 -