xHarbour Reference Documentation > Command Reference |
Displays a box on the screen.
@ <nTop>, <nLeft>, <nBottom>, <nRight> BOX <cBoxString> ; [COLOR <cColor>]
Pre-defined box strings for @...BOX
Constant | Description |
---|---|
B_SINGLE | Single-line box |
B_DOUBLE | Double-line box |
B_SINGLE_DOUBLE | Single-line top, double-line sides |
B_DOUBLE_SINGLE | Double-line top, single-line sides |
The @...BOX command displays a box on the screen as specified with <cBoxString>, using the standard color of SetColor() or <cColor>, if specified.
The first eight characters of the string <cBoxString> define the border of the box in clockwise direction, beginning with the upper left corner. An optional nineth character fills the area inside the box. Alternatively, a single character can be passed which is used to draw the entire box border.
When the box is completely drawn, the cursor is positioned at the coordinates <nTop>+1 and <nLeft>+1, so that Row() and Col() can be used to start displaying text in the upper left corner of the box area.
See also: | @...CLEAR, @...SAY, @...TO, DispBox(), Scroll() |
Category: | Output commands |
Header: | box.ch |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates how characters are used to draw a box. // Alphabetic characters define <cBoxString> instead of characters // holding graphic signs. #include "Box.ch" PROCEDURE Main CLS @ 10, 10, 20, 50 BOX "AbCdEfGhi" COLOR "W+/R" Inkey(0) @ 10, 10, 20, 50 BOX B_DOUBLE + Space(1) @ Row(), Col() SAY "Using #define constant" @ MaxRow()-1, 0 RETURN
http://www.xHarbour.com