FillColor

From Xojo Documentation
Jump to: navigation, search
Method

The operating system’s currently selected background color.

Syntax

result=FillColor

Part Type Description
result Color The color used for drawing the background of controls and windows.

Notes

This value is useful when you are using Canvas controls to create custom controls. When drawing objects, use this color to fill the background.

This value can be changed by the user, so you should access this value during your Paint event handler rather than storing the value.

Example

This example uses the system fill color to set the color of a square with a 3D "raised" look. The code is in the Paint event of a Canvas.

Const White = &cffffff
Const DarkGray = &c8c8c8c

g.ForeColor = White
g.DrawLine(1, 1, Me.Width, 1)
g.DrawLine(1, Me.Height - 1, 1, 1)
g.ForeColor = DarkGray
g.DrawLine(Me.Width - 1, 2, Me.Width - 1, Me.Height)
g.DrawLine(1, Me.Height - 1, Me.Width, Me.Height - 1)
// fill in using the system Fill color
g.ForeColor = FillColor
g.FillRect(2, 2, Me.Width - 3, Me.Height - 3)

See Also

DarkBevelColor, DarkTingeColor, DisabledTextColor, FrameColor, LightBevelColor, LightTingeColor, HighlightColor, TextColor functions; Color data type; Canvas, Graphics classes.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About