Fill (Class Property)

Most objects use the Fill Class Property to set the following three properties of an object.

 

Color (Color is itself a Class Property - see Color)

Style

Hatch

 

A fill object may be made transparent by setting its Style property to 1. An object can have a solid fill of a particular color, a fill of a specified pattern, or no fill.

The effect of changing an object's Fill property is not displayed until the object is redrawn, either as the result of a user action or through a script that redraws the object.

 

Style

Style holds a number indicating whether the object is transparent, opaque, or hatched. If Style is hatched, then Hatch is a number indicating how the control face is painted (such as solid, diagonal lines, or vertical lines).

 

Type

Number:

 

Details

0 = Solid

1 = No Fill (transparent)

2 = Hatch (patterned)

 

Example

MyObject.fill.style := 2 .

 

Hatch

This read/write property controls the type of pattern to use for a fill.

 

Type

Number:

 

Details

0 = Horizontal Lines1 = Vertical Lines2 = Diagonal from top left to bottom right3 = Diagonal from top right to bottom left4 = Grid Hatch5 = Cross Hatch

 

Example

MyObject.fill.hatch := 3 .

 

Remember that you can only set the hatch property if the Style is set to Hatch (2), so the full example would be:

 

MyObject.fill.style := 2 .

MyObject.fill.hatch := 3 .

MyObject.redraw := 1 .

 

Color

Color is itself a Class Property. See Color.