TEXT_HEIGHT()

TEXT_HEIGHT(T,N)

RETURNS THE HEIGHT OF THE TEXT T IF IT IS DISPLAYED BY THE SYSTEM OBJECT NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: System Objects

ACTION

The function TEXT_HEIGHT(T,N) returns the height of the text T if it is displayed by the system object number N, taking into account the used font, its style and its size.

The system object is of type: FORM, COMBO, ALPHA, LIST, PICTURE, GRID.

SYNTAX: Result=TEXT_HEIGHT(T,N)

  • T = string
  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The function TEXT_HEIGHT() is used to know the height of a text it is displayed.

ERROR

  • If T is not a correct expression.
  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If the object number N does not exist.
  • If number N is not the number of : FORM, COMBO, ALPHA, LIST, PICTURE, GRID.

EXAMPLE

rem create an ALPHA

alpha 1

rem display the height of "Hello" as title

caption 0, text_height("Hello",1)

SEE ALSO

TEXT_WIDTH()