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>hpwrap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpWrap()

Wrap non-justified, proportionally or fixed spaced text


Syntax

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


Parameters

<cString>
The string or memo field to wrap.

<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 wrapped lines printed successfully.


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

-12
Wrong number of parameters passed.

-17
Invalid parameter type was passed.


Remarks

With hpWrap(), there's no need to mess with the line extraction and line
counting of functions like MEMOLINE() and MLCOUNT().  Simply specify
the positions and length, and your proportionally spaced text will be
automatically wrapped.


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')
hpWrap( MEMO, 10, 10, 4 )

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

hpWrap( MEMO )

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

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

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

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