Color.LightBevelColor

From Xojo Documentation

Method

The currently selected operating system color for drawing light lines in dividing lines and group boxes.

Usage

result = Color.LightBevelColor

Part Type Description
result Color The color used for drawing the light lines in dividing lines and group boxes.

Notes

fa-info-circle-32.png
This color value does not change when IsDarkMode is True.

This value is useful when you are using Canvas controls to create custom controls. When drawing controls like dividing lines and GroupBoxes, use this color for the light portions of the object (usually the top and left sides of the object).

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

Sample Code

The following example uses the methods LightBevelColor and DarkBevelColor in a Canvas object that has a raised 3D look. This code is in the Canvas.Paint event.

Const White = &cffffff

g.DrawingColor = White
g.DrawLine(1, 1, g.Width, 1)
g.DrawLine(1, g.Height - 1, 1, 1)
g.DrawingColor = Color.DarkBevelColor
g.DrawLine(g.Width - 1, 2, g.Width - 1, g.Height)
g.DrawLine(1, g.Height - 1, g.Width, g.Height - 1)
// fill in the light gray rectangle
g.DrawingColor = Color.LightBevelColor
g.FillRectangle(2, 2, g.Width - 3, g.Height - 3)

See Also

Color for a complete list of functions