DarkBevelColor

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

The currently selected operating systems color for drawing dark lines in Groupboxes.

Usage

result = DarkBevelColor

Part Type Description
result Color The color used for drawing the dark 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 dark portions of the object (usually the right and bottom 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 constants LightBevelColor and DarkBevelColor in a Canvas object that has a raised 3D look. This code is in the Paint event.

Const White = &cffffff
g.ForeColor = White
g.DrawLine(1, 1, Canvas1.Width, 1)
g.DrawLine(1, Canvas1.Height - 1, 1, 1)
g.ForeColor = DarkBevelColor
g.DrawLine(Canvas1.Width - 1, 2, Canvas1.Width-1, Canvas1.Height)
g.DrawLine(1, Canvas1.Height - 1, Canvas1.Width, Canvas1.Height - 1)

// fill in the light gray rectangle
g.ForeColor = LightBevelColor
g.FillRect(2, 2, Canvas1.Width - 3, Canvas1.Height - 3)

See Also

CMY, DarkTingeColor, DisabledTextColor, FillColor, FrameColor, HighlightColor, HSV, LightBevelColor, LightTingeColor, RGB, TextColor functions; Color data type.