Canvas_GetTextHeight

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > Canvas Control > Canvas Control Commands >

Canvas_GetTextHeight

 

Description

 

Calculates the total height size of a string, based on the current font for the canvas target.

 

Syntax

 

n = Canvas_GetTextHeight( StringExpression )

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

StringExpression

String

No

Any string expression

 

Remarks

 

The size returned is specified in the same terms (pixels or dialog units) as the parent dialog (or world coordinates, if those were chosen with Canvas_Scale).

This allows you to easily calculate the appropriate print position, particularly when using a proportional font.

 

Restrictions

 

See also

 

Examples