Previous: 4.37.2.121. Stretch procedure To the Table of Contents Next: 4.37.2.123. TextWidth function
4.37.2.121. Stretch procedure Table of Contents 4.37.2.123. TextWidth function

- 4.37.2.122. -
Table of Contents
4. Standard Units
4.37. Graph - Graph unit
4.37.2. Graph Unit Procedures and Functions
4.37.2.122. TextHeight function


4.37.2.122. 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: 4.37.2.121. Stretch procedure To the Table of Contents Next: 4.37.2.123. TextWidth function
4.37.2.121. Stretch procedure Table of Contents 4.37.2.123. TextWidth function

- 4.37.2.122. -