Very very simple, if you are using FWH 16.04 or later. You do not need to calculate any thing.
Please use this syntax:
- Code: Select all Expand view RUN
#xcommand @ <nRow>, <nCol> PRINT TO <prn> TEXT <cText> ;
[SIZE <nWidth> [,<nHeight>] ] ;
[<unit: PIXEL,MM,CM,INCHES>] ;
[FONT <fnt>] ;
[ALIGN <aln>] ;
[COLOR <nTxt> [,<nBck> ] ] ;
[LASTROW <lrow>] ;
Example: If we want to print a multi-line text or an array of text lines, from row at 3 inches and column at 2.5 inches with a width of 3.5 inches, then
- Code: Select all Expand view RUN
@ 3, 2.5 PRINT TO oPrn TEXT cMultiLineText SIZE 3.5 INCHCES FONT oFont LASTROW nNextRow
This command prints the text in multi-line, splitting the text appropriately. This takes as much height as required, because we did not specify the height. After printing, this returns the last row (in inches) used for printing the last line.
We can use the nNextRow to begin print of next element.
If we do not specify the width, then this method uses the entire width of the page starting from 2.5 inches on left.
This command can be used for small text or memo (multi-line) or even an array of text lines.
The vairiable cMultiLineText can also be a codeblock in which case, the codebolck is evaluated. If this value is of another data-type, it is converted as text.