Graphics.FillRect

From Xojo Documentation

Method

Graphics.FillRect(x As Double, y As Double, width As Double, height As Double)

Supported for all project types and targets.

Draws a rectangle filled with the current color. The current color is set with the ForeColor property.

Notes

X and Y are the coordinates of the top-left corner. Width and Height specify the size of the rectangle.

Sample Code

This example draws a rectangle with a red interior.

g.ForeColor = &cff0000 // Red
g.FillRect(10, 10, 100, 60)