Command @...BOX Foundation

Outputs a box on the screen.

Syntax
@ <nTop>, <nLeft>, <nBottom>, <nRight> BOX <cBoxString> ;
                                    [COLOR <cColor>]
Parameters
<nTop>
<nTop> is an integer numeric value specifying the top screen row at which the box is displayed. The four arguments <nTop>, <nLeft>, <nBottom> and <nRight> specify the screen coordinates of the box. The command @...BOX draws a box with row positions ranging from 0 to MaxRow() and column positions ranging from 0 to MaxCol().
<nLeft>
<nLeft> is an integer numeric value specifying the left screen column of the displayed box.
<nBottom>
<nBottom> is an integer numeric value specifying the bottom screen row of the displayed box. When <nBottom> is greater than MaxRow(), the bottom line is output outside of the screen area and is not visible.
<nRight>
<nRight> is an integer numeric value specifying the right screen column of the displayed box. When <nRight> is greater than MaxCol(), the right column is output outside the screen area and is not visible.
<cBoxString>
<cBoxString> specifies the characters used for the border of the box. It is generally a character string of nine characters. The first eight define the border of the box and the ninth character is used to fill the box. If <cBoxString> contains only a single character, the entire box is drawn using this character.
<cColor>
The optional argument <cColor> specifies the color in which the box is displayed. If this argument is missing, the box is drawn using the default setting of the current system color defined with SetColor().
Description

The command @...BOX displays a box at the specified coordinates using the defined characters. The color for the border can be optionally specified. The border is defined using <cBoxString>. The first eight characters are used to display the border. The first character of this string defines the top left corner of the box. The following characters are used to define the border in a clockwise order. The ninth character is used to fill the box. When the ninth character is missing, only the border is output and the screen area within the box remains unchanged.

The command @...BOX sets the cursor to the position <nTop>+1and <nLeft>+1. Row() and Col() then return these new values for the cursor position.

In the file Box.ch (in the directory \XPP\INCLUDE), various constants are defined for the borders of boxes. The correct display of the graphic characters of box borders requires an appropriate system font be installed.

Examples
@...BOX
// The program example displays four boxes, one after another, 
// to show various boxes drawn with @...BOX. 

#include "Box.ch" 

PROCEDURE Main 
   CLS 

   @ 7,10,17,60 BOX B_SINGLE        // single line box in 
   Inkey(0)                         // default system color 

   @ 7,10,17,60 BOX B_DOUBLE COLOR "W+/B" 
                                    // double line box in bright 
   Inkey(0)                         // white on a blue background 

   @ 7,10,17,60 BOX B_SINGLE        // single line 
   ?? "Box-String:", B_SINGLE       // without fill characters 
   Inkey(0) 

   @ 7,10,17,60 BOX B_DOUBLE + Chr(176) COLOR "N/BG" 
                                        // double line 
   ?? "Box-String:",B_DOUBLE + Chr(176) // with fill characters 
   Inkey(0) 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.