TEXT-GET-EXTENT Action

This document covers the following topics:


Description

Returns the size of a text if a certain font is chosen. You can use this action, for example, to find out the best font that still has an acceptable width and height.

Parameters

Name/Data Type Explanation
HANDLE OF FONT Input

Specifies a Font Control.

Text (A) Input

The text to be measured.

Note:
If this parameter is a dynamic or large alpha variable, it is possible to measure text longer than 253 characters.

Width (I4) Output

Width in pixels.

Height (I4) Output

Height in pixels.

Response (I4) Output

Natural error (if applicable).

Example:

 
   /*Check the size a font will require 
   #TEXT := 'Check the size' 
   PROCESS GUI ACTION TEXT-GET-EXTENT WITH FONT-HANDLE #TEXT #WIDTH #HEIGHT 
   GIVING #RESPONSE