Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hpjust()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpJust()

Wrap a line of text, fully justified


Syntax

hpJust(<cString> [, <nStartRow> [, <nStartCol> [, <nLength> ;
   [, <nSpacing> [, <cUnits>]]]]])


Parameters

<cString>
The string or memo field to wrap, fully justified.

<nStartRow>
The starting row to begin printing the text.  If omitted,
<nStartRow> will default to the current row.

<nStartCol>
The left column to begin printing the text.  If omitted,
<nStartCol> will default to the left margin.

<nLength>
The length of each line of text, before it begins wrapping
to the next line.  This value must be specified in inches.
If omitted, <nLength> will default to the width of the page.

<nSpacing>
The line spacing to use for the wrapping.  For instance,
<nSpacing> of 1 will result in single spaced text, 2 will
be double spaced, 1.5 will be 1 1/2 spaced, and so on.

<cUnits>
The units of measurement to used for the positioning
parameters.  If <cUnits> is omitted, the units will default
to Rows and Columns.  Values for <cUnits> can be:
"R"     Rows and Columns
"I"     Inches
"M"     Millimeters


Returns

Any positive number.
The number of justified lines printed successfully.

-10
Font information is missing.  hpSetFont( ) must be called first.

-12
Wrong number of parameters passed.

-17
Incorrect parameter type was specified.


Remarks

Because character widths vary for proportional fonts, word wrapping is
not accurate using Clipper's MEMOLINE() and MLCOUNT() functions.

With hpJust(), there's no need to mess with the line extraction and line
counting of functions like MEMOLINE() and MLCOUNT().  Simply specify
the positions to wrap within, and your proportionally spaced text will be
fully justified.


Support By

All HP Laserjet Printers


Example

Wrap a memo field named MEMO, with a proportional font, beginning at
row 10, col 10, and a line length 4 inches:

hpConfig()
hpSetFont('HELV 12B', 'Z')
hpJust(MEMO, 10, 10, 4)

To wrap the same memo field, filling the entire width of the page:

hpJust(MEMO)

To double space the memo field, filling the entire page:

hpJust(MEMO, 1, 0, 8, 2)

See Also: hpWrap() hpJustLine() hpJustCount() hpMemoLine() hpMLCount()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson