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

Draws a gray shaded bar, one line high, with one of several different border
types


Syntax
hpGrayBar(<nRow>, <nCol>, <nLength> [,<nBorder> [,<nShade> [,<cUnits>]]])


Parameters

<nRow>
The row where the bar is to be drawn at.

<nCol>
The leftmost column where the bar is to begin at.

<nLength>
The length of the bar specified by number of characters.

<nBorder>
The line type used for the border.  Defaults to 1.  Values can be:
0       No border
1       Single line
2       Double line
3       Dotted line
4       Hairline
5       0.5 point
6       1 point
7       2 point
8       3 point
9       4 point
10      6 point
11      8 point

<nShade>
The percent of gray shading used to fill the bar with.
Defaults to 10%.  There are eight shading levels.  To
specify a shade use any value from 1 to 100.  If omitted,
<nShade> will default to 10.  See "Appendix B - Shades
and Fill Patterns" for a description of the different
shading levels.

<cUnits>
The units of measurement to used for positioning.
Defaults to 'R'.  Values for <cUnits> can be:
"R"     Rows and Columns
"I"     Inches
"M"     Millimeters
Note:  Use hpIGrayBar(), or specify 'I' or 'M' for the
<cUnits> parameter when using a proportional font.


Returns

0
Successful.

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

-12
Wrong number of parameters passed.

-17
Incorrect parameter type.


Remarks

hpGrayBar() is most useful in simulating continuous green bar paper to
create attractive and easy to read reports.  After printing a line of text,
simply call hpGrayBar() and your text will be highlighted.  Try using
hpGrayBar() in your error reports.  Rather than trying to distinguish
special lines with an '*', be certain your lines will stand out by using
gray shading just as you would use a highlighter.

Note:  To see an example of how hpGrayBar() can be used to enhance
your reports, see HPCARTS.PRG and HPFONTS.PRG which are included
on your distribution diskette.


Support By

All HP Laser Printers except the original HP Laserjet


Example

To highlight a string with a gray bar:

cString = 'This string is highlighted with a gray bar'
@ 10,10 SAY cString
hpGrayBar(10, 10, LEN(cString))

To highlight a string with a double bordered gray bar and 20 percent
shading:

cString = 'This gray bar has a double line border'
@ 10,10 SAY cString
hpGrayBar(10, 10, len(cString), 2, 20)

See Also: hpBox() hpGrayBox() hpGrayCol() hpPattBar() hpPattBox() hpPattCol()

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