FrameColor

From Xojo Documentation

Method

The system control color.

Usage

result = FrameColor

Part Type Description
result Color The color used for drawing the outline of a RectControl.

Notes

This value is useful when you are using Canvas controls to create custom controls. When drawing objects, use this color for the object’s frame. ListBoxes, for example, use this color to draw the dark frame around the ListBox.

This value can be changed by the user or when the system switches between light and dark modes, so you should use this method in your Paint Event handler rather than storing the value.

Sample Code

This code uses the system FrameColor to draw the bottom and right of this object. The code is in the Paint event of the Canvas.

Const White = &cffffff

g.ForeColor = White

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

See Also

DarkBevelColor, DarkTingeColor, DisabledTextColor, FillColor, HighlightColor, LightBevelColor, LightTingeColor, TextColor functions; Color data type; UserGuide:Dark Mode topic.