PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Calculating the height of a text written with fonts of different sizes
  • Calculating the height of a text containing CR characters
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Calculates the height of font for the text to print (en millimeters).
Example
x is int = iTextHeight(iFont(2) + CU.CUSTNAME)
iPrintWord("The height of customer name is equal to: ")
iPrint(x)
iEndPrinting()
Syntax
<Result> = iTextHeight([<Font identifier> + ] <Text to print>)
<Result>: Real
  • Height of specified text (in millimeters) if the print is performed,
  • -1 if the print was canceled before running the function.
<Font identifier>: Optional character string
Identifier of the font used, returned by iFont. If this parameter is not specified, the last font used will be selected.
<Text to print>: Character string (with quotes)
Character string whose height is requested.
Caution: a height is returned even if the text to print corresponds to an empty string.
Remarks

Calculating the height of a text written with fonts of different sizes

You must call iTextHeight for each text that is using a different font.

Calculating the height of a text containing CR characters

iTextHeight ignores the CR characters found in the text. You must count the number of CR characters in order to add as many times the text height to get the total height.
Component : wd250prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment