Description

The color(s) to use for fill when the image does not cover the display area.

Property type

A Long value.  

Syntax

object.FillColors([WhichColor]) [= value]

The FillColors Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDisplay.
WhichColorOptional. A mcWhichFillColors enumeration, as described in settings.

Specifies whether the foreground color (mcwfcForeground) or the background color (mcwfcBackground) is being accessed or assigned to. If no argument is given to the FillColors property then the foreground color is the value that is exposed or assigned. Note that when the foreground color is assigned to, that will also change the background color.

[out, retval]

[in]

valueA Long value.

Settings

The settings for WhichColor are:

ConstantValueDescription
 mcwfcForeground0

The foreground color for hatched FillPattern's and the color used by the solid FillPatterns. If no argument is given to the FillColors property then this is the value that is exposed or assigned.

 mcwfcBackground1

The background color for hatched FillPattern's. Always assign the foreground color, FillColors(mcwfcForeground) or just FillColors, before assigning to FillColors(mcwfcBackground). This is because an assignment to FillColors(mcwfcForeground) automatically sets FillColors(mcwfcBackground) to the compliment of the assigned foreground color.

Remarks

When the image will not fully cover the display area, the portion of the display not covered is filled with a pattern. This property sets the color(s) for that pattern; the FillPattern property sets the pattern.

The FillColors property is used to access or set both the foreground fill color and the background fill color. The foreground color is the hatching color for hatched FillPattern's and is the color used by the solid FillPatterns. The background fill color is the color of the background for hatch FillPattern's, and has no effect when the FillPattern is set to mcfpSolid.

Colors are exposed and assigned as a long value where the low order byte is a red value, the next byte is green and the next byte is blue, all holding values from 0 to 255. The high order byte is ignored.

Whenever the forground fill color is assigned, the background fill color is automatically set to it's complimentary color (e.g if the foreground color is assigned black, vbBlack or &H000000, then the background color will be white, vbWhite or &HFFFFFF). Thus to set the background to some other color you must assign FillColors(mcwfcBackground) after first doing any assigning to FillColors(mcwfcForeground). See Example 2.

The default FillColors initially and after a call to ResetToDefaults is black on white. The default FillPattern is a diagonal crosshatch.