ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Rich Text Area control
  • Example 1: Calculating the height required to print a text in RTF
  • Example 2: Calculates the height required to print a text
iZoneHeight (Example)
Example 1: Calculating the height required to print a text in RTF
WINDEVWEBDEV - Server codeAjax
The following example is used to calculate the height of the area required to print a text in RTF. A border is drawn (according to the height that was previously defined) and the text is printed.
// Retrieve the height of the column
dHeight is real = iZoneHeight(sRTFText, 100, iRTF)
// Draws a border
iBorder(0, 0, dHeight*2, 200)
// Text centered in the border
iPrintZoneRTF(sRTFText, 0, 0, dHeight*2, 200)
iEndPrinting()
Example 2: Calculates the height required to print a text
WINDEVWEBDEV - Server codeiPhone/iPadAjax
The following example is used to calculate the height of the area required to print a text. A border is drawn (according to the height that was previously defined) and the text is printed.
// Retrieve the height of the column
dHeight is real = iZoneHeight("My Text", 100)
// Draws a border
iBorder(0, 0, dHeight*2, 200)
// Text centered in the border
iPrintZone("My Text", 0, 0, dHeight*2, 200, iCenterH + iCenterV)
iEndPrinting()
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help