@ ... TO Command
| Visual FoxPro 9.0 SP2 |
| @ ... TO Command |
| See Also |
|
Included for backward compatibility. Use the Shape Control instead.
This command is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:
Draws a box, circle, or ellipse using specified coordinates.
@ row1, column1 TO row2, column2 [DOUBLE | PANEL | border string] [PATTERN expN1] [PEN expN2 [, expN3]] [STYLE expC] [COLOR SCHEME expN4 | COLOR color pair list] |
Parameters
row1, column1 ... row2, column2row1, column1 are the coordinates of the upper-left corner of the box. row2, column2 are the coordinates of the lower-right corner of the box. If row1 and row2 are the same, a horizontal line is drawn. If column1 and column2 are the same, a vertical line is drawn.
DOUBLE | PANEL | border string
If DOUBLE is included, the box is drawn with a double-line border. If PANEL is included, the box is drawn with a solid border.
border string is a set of characters that specify parts of the box in this order: top, bottom, left side, right side, upper-left corner, upper-right corner, lower-left corner, lower-right corner.
Specify the characters in the border string using one of the following forms and separate them with commas:
Literal characters enclosed in string delimiters (single or double quotation marks or brackets).
@ 1,10 TO 22,45 '=', '=', '|', '|', '+', '+', '+', '+'
Character expressions or variables delimited with commas.
STORE '=' TO END
STORE '|' TO SIDE
STORE '+' TO CORNER
@ 1,10 TO 22,45 END,END,SIDE,SIDE,CORNER,CORNER,CORNER,CORNER
The ASCII value of the characters specified in CHR() functions.
STORE CHR(61) TO END
STORE CHR(124) TO SIDE
STORE CHR(43) TO CORNER
@ 1,10 TO 22,45 END,END,SIDE,SIDE,CORNER,CORNER,CORNER,CORNER
@ 1,10 TO 22,45 CHR(61),CHR(61),CHR(124),CHR(124);
CHR(43),CHR(43),CHR(43),CHR(43)
You can draw the box with a single character by including the top character and omitting the remaining characters. This example draws a box using asterisks:
STORE '*' TO BOX_CHAR
@ 1,10 TO 22,45 BOX_CHAR
-------------------------------
Note - If SET BORDER is set to NONE and you don't include DOUBLE, PANEL or a border string, the box is drawn without a border.
-------------------------------
PATTERN expN1
PATTERN accepts a numeric argument from 0 through 7 that specifies the pattern that fills the object. This numeric argument corresponds to the fill patterns available for an object with the Screen Builder.
-------------------------------
Note - The pattern is drawn in the background color, so you must include the COLOR clause with a different background color to make the pattern visible.
-------------------------------
expN1 Pattern
------- -------
0 None
1 Solid
2 Horizontal lines
3 Vertical lines
4 Forward diagonals
5 Backward diagonals
6 Crosshatch
7 Slanted crosshatch
The PATTERN clause is ignored in FoxPro for MS-DOS.
PEN expN2 [, expN3]
Include the PEN clause to specify an object's outline. The width of the pen used to draw the outline is specified with expN2, and the pen type is specified with expN3. Note that a 1 point line is always created if you include expN3 to specify a pen type.
The following table lists values for expN2 and expN3 and the corresponding pen widths and types.
expN2 Pen Width
------- ---------
0 Hairline*
1 1-point*
2 2-point
3 3-point
4 4-point
5 5-point
6 6-point
* Lines drawn with the hairline and 1-point pens may display as 1 point wide with some display drivers and hardware.
expN3 Pen Type
------- --------
0 None
1 Dotted
2 Dashed
3 Dash-dot
4 Dash-dot-dot
100 3-D rectangle
The PEN clause is ignored in FoxPro for MS-DOS.
In FoxPro for Macintosh, only solid and dotted lines are supported; including 1, 2, 3 or 4 creates a dotted line.The 100 pen type is only supported in FoxPro for Macintosh, and creates 3-dimensional rectangles. When you include 100 for the pen type, any additional clauses you include (PATTERN, STYLE, COLOR, etc.) are ignored.
STYLE expC
The type of object created (rectangle, rounded rectangle, circle or ellipse) is specified by expC. Objects created with @ ... TO are opaque by default; include T in expC to create a transparent object.
Include a number from 0 to 99 in expC to specify the curvature of the object's corner: 0 specifies no curvature and creates square corners; 99 specifies the maximum curvature and creates circles and ellipses.
The STYLE clause is ignored in FoxPro for MS-DOS.
COLOR SCHEME expN4 | COLOR color pair list
The color of the object you create with @ ... FILL can be specified by including the number of an existing color scheme in the COLOR SCHEME clause or a set of color pairs in the COLOR clause.
A color scheme is a set of 10 predefined color pairs. The color pairs in a color scheme can be changed with SET COLOR OF SCHEME. In FoxPro for MS-DOS, the color pairs in a color scheme can also be changed in the Color Picker.
A color pair is a set of two letters separated by a forward slash. The first letter specifies the foreground color and the second letter specifies the background color.
For example, this color pair specifies a red foreground on a white background:
R/W
For a list of colors and their corresponding color letters, see SET COLOR Commands Overview or Color Table by Color Pair.
A color pair can also be specified with a set of six RGB (Red Green Blue) color values separated by commas. The first three color values specify the foreground color and the second three color values specify the background color. The color values can range from 0 through 255.
The R/W color pair in the example above can also be specified with this RGB color pair:
RGB(255,0,0,255,255,255)
Only the first color pair in the specified color scheme or color pair list determines the color of the object.
The first color in the color pair is the pen color, the second color is the fill color. For example, the following creates an ellipse with a solid red interior and a blue outline:
@ 2,2 TO 12,22 STYLE '99' ;
PATTERN 1 PEN 2 COLOR 'B/R'
If you omit the color clause, the rectangular portion is cleared. An area can also be cleared with @ ... CLEAR.
Remarks
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic

Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08