FillColor
From Real Software Documentation
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,canvas1.width,1
g.drawline 1,canvas1.height-1,1,1
g.forecolor=DarkGray
g.drawline canvas1.width-1,2,canvas1.width-1,canvas1.height
g.drawline 1,canvas1.height-1,canvas1.width,canvas1.height-1
//fill in using the system Fill color
g.ForeColor=FillColor
g.fillrect 2,2,canvas1.width-3,canvas1.height-3
Const DarkGray = &c8c8c8c
g.forecolor=White
g.drawline 1,1,canvas1.width,1
g.drawline 1,canvas1.height-1,1,1
g.forecolor=DarkGray
g.drawline canvas1.width-1,2,canvas1.width-1,canvas1.height
g.drawline 1,canvas1.height-1,canvas1.width,canvas1.height-1
//fill in using the system Fill color
g.ForeColor=FillColor
g.fillrect 2,2,canvas1.width-3,canvas1.height-3
See Also
DarkBevelColor, DarkTingeColor, DisabledTextColor, FrameColor, LightBevelColor, LightTingeColor, HighlightColor, TextColor functions; Color data type; Canvas, Graphics classes.
