Command @...TO Foundation

Displays a box with a single or double lined border.

Syntax
@ <nTop>, <nLeft> TO <nBottom>, <nRight> ;
              [COLOR <cColor>] [DOUBLE]
Parameters
<nTop>
<nTop> is an integer numeric value specifying the top screen row for display of the box. The four arguments <nTop>, <nLeft>, <nBottom> and <nRight> specify the screen coordinates for the box. @...TO 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 where the box is displayed.
<nBottom>
<nBottom> is an integer numeric value specifying the bottom screen row where the box is displayed. When <nBottom> is greater than MaxRow(), the bottom row is output outside of the screen area and is not visible.
<nRight>
<nRight> is an integer numeric value specifying the right screen column where the box is displayed. When <nRight> is greater than MaxCol(), the right column is outside of the screen area and is not visible.
<cColor>
The optional argument <cColor> defines the color of the displayed box. If this argument is missing, the box is drawn with the default color setting (first color value) of the current system color set with SetColor().
DOUBLE
@...TO normally displays a box with a single line. Specifying the option DOUBLE results in a double line box.
Description

The screen command @...TO displays a box on the screen with single or double lines. If the row positions <nTop> and <nBottom> are identical, a horizontal line is displayed. A vertical line is displayed if the values of <nLeft> and <nRight> are identical.

After output, the cursor is positioned at the upper left corner of the box (at <nTop>+1 and <nLeft>+1) and the functions Row() and Col() return this updated position.

Examples
Comparison between @...TO and @...BOX
// In this example, two boxes are first output with @...TO. 
// The same boxes are then output using the command @...BOX. 

#include "Box.ch" 

PROCEDURE Main 

    @ 5, 10 TO 10, 35 
    @ 5, 40 TO 10, 65 DOUBLE COLOR "N/BG" 

    @ 15, 10, 20, 35 BOX B_SINGLE 
    @ 15, 40, 20, 65 BOX B_DOUBLE COLOR "N/BG" 

RETURN 

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.