[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Box FastTTT
Purpose To draw a rectangle or box on the screen.
Declaration Box(X1,Y1,X2,Y2,F,B,Boxtype: byte);
X1 is the top left X coordinate (1..79)
Y1 is the top left Y coordinate (1..24)
X2 is lower right X coordinate (2..80)
Y2 is lower right Y coordinate (2..25)
F is the foreground color (0..15)
B is the background color (0..15)
Boxtype is the box line type (see remarks)
Uses FastTTT.
Remarks The area inside the box is not cleared.
The normal values for the Boxtype are:
1 Single line
2 Double line
3 Single top/bottom, double sides
4 Double top/bottom, single sides
If a BoxType of 0 is passed the the procedure will use a
space (' ') as the box character. If any other number (i.e.
5..256) is used, the box is drawn using the ascii character
represented by the number. Refer to the Turbo Pascal Owner's
Handbook page 568 to see the ascii table.
Example
USES CRT, FASTTTT;
BEGIN
CLRSCR;
BOX(1,1,80,12,WHITE,RED,1);
BOX(1,13,80,25,BLUE,LIGHTGRAY,2);
END.
The screen would be cleared, a single lined box would be drawn on the
top half of the screen, and a double lined box in the lower half. Note
that the CRT unit was also USED - this allowed the use of ClrScr, and
the colors could be referred to by name rather than their numeric
code.
See Also:
FBox
GrowFBox
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson