Description: This statement places a (lined) grid pattern on the screen.
Returns: Nothing
Usage: Steady State
Format: Grid(X1, Y1, X2, Y2, Style, Color, Horizontal, Vertical)
Parameters: X1 { numeric } { required } { no default }
Any numeric expression giving the X coordinate on the screen of one side of the grid area.
Y1 { numeric } { required } { no default }
Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the grid area.
X2 { numeric } { required } { no default }
Any numeric expression giving the X coordinate on the screen of the side of the grid area opposite to X1.
Y2 { numeric } { required } { no default }
Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the grid area, whichever is the opposite to Y1.
Style { numeric } { required } { no default }
Any numeric expression giving the line style for the grid lines. Valid line styles are from 1 to 10, where 1 is a solid line.
Color { numeric } { required } { no default }
Any numeric expression giving the color of the grid lines. If the number is less than 10000, the grid lines are non-destructive; if greater than or equal to 10000, the grid lines are destructive and the actual color used is Color - 10000.
Horizontal { numeric } { required } { no default }
Any numeric expression giving the number of horizontal lines in the grid. This value may be zero.
Vertical { numeric } { required } { no default }
Any numeric expression giving the number of vertical lines in the grid. This value may be zero.
Comments: This statement is non-destructive unless Color is explicitly set destructive. The outside perimeter of the grid area is not drawn.
Example:
Grid(100, 100, 700, 500 { Bounding box for the grid },
3 { Dotted line style },
9 { Light blue color },
3 { 3 horizontal lines divide 4 areas },
5 { 5 vertical lines divide 6 areas });
This example divides an area into 6 blocks wide by 4 blocks high using 3 horizontal lines and 5 vertical lines.
See Also:
Box | GUIRectangle| Line | ZBox | ZGrid