Futurebasic/Language/Reference/box
Box
[edit | edit source]Statement
[edit | edit source]✔ Appearance ✔ Standard ✔ Console
Syntax
[edit | edit source]box [fill] [h, v] to h1, v1 [to h2, v2 ...]
Description
[edit | edit source]Draws a rectangle which has diagonally opposite corners at coordinates (h,v
) and (h1,v1
). The rectangle's frame is drawn using the current pen size, mode, pattern and color for the current window or printer. If the fill
clause is specified, then the rectangle is filled with the current window pattern.
If the to
keyword is specified more than once, then several rectangles are drawn, each using (h,v
) as one corner, and the coordinates following to
as the diagonally opposite corner.
If the h
and v
parameters are omitted, then the rectangle's originating point is set to one of the following:
- The (
h,v
) coordinates of the most recentbox
statement (in any window) that actually specified theh
andv
parameters; - The last point specified in the most recent
plot
statement (in any window); - (0,0), if no
plot
statement has yet been executed, and no priorbox
statement that specifiedh
andv
has yet been executed.
Console Behavior
[edit | edit source]When you use the Console, box
always switches to the Graphics Window before drawing. You can't use box
to draw a box in the Text Window, or on the printer; use the Toolbox procedures FrameRect
or PaintRect
instead. Alternatively, you can activate the graphics window and select Print from the File menu.
Notes
[edit | edit source]No special notes.