BOX (draw a rectangle)

Top  Previous  Next

 

BOX( x ,y ,width ,height [,fill] [,attributelist])

BOX

Draws a rectangular box on the current window or report.

x

An integer expression that specifies the horizontal position of the starting point.

y

An integer expression that specifies the vertical position of the starting point.

width

An integer expression that specifies the width.

height

An integer expression that specifies the height.

fill

A LONG integer constant, constant EQUATE, or variable containing the red, green, and blue components that create the color in the three low-order bytes (bytes 0, 1, and 2) or an EQUATE for a standard Windows color value.

attributelist

A string constant, variable, or EQUATE containing an optional type of output document and its associated attributes. Only valid when the target is a REPORT. See EXTEND

The BOX procedure places a rectangular box on the current window or report. The position and size of the box are specified by x, y, width, and height parameters. This procedure is valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#.

The x and y parameters specify the starting point, and the width and height parameters specify the horizontal and vertical size of the box. The box extends to the right and down from its starting point.

The border color is the current pen color set by SETPENCOLOR; the default color is the Windows system color for window text. The border width is the current width set by SETPENWIDTH; the default width is one pixel. The border style is the current pen style set by SETPENSTYLE; the default style is a solid line.

Example:

MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL

         !window controls

        END

CODE

OPEN(MDIChild)

BOX(100,50,100,50,00FF0000h)   !Red box

 

See Also:

Current Target

SETPENCOLOR

SETPENWIDTH

SETPENSTYLE