Color.HighlightColor

From Xojo Documentation

Method

Returns the operating system’s highlight color.

Syntax

result = Color.HighlightColor

Part Type Description
result Color The user’s chosen highlight color.

Notes

On Windows, the highlight color can be modified via the Display Control Panel. In macOS, the highlight color is set in the General System Preferences panel. On Linux, the highlight color is affected by the user's Window Manager and themes.

Example

The following example uses the system highlight color to fill in a rectangle. The code is in the Paint event of a Canvas.

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 rectangle
g.DrawingColor = Color.HighlightColor
g.FillRectangle(2, 2, g.Width - 3, g.Height - 3)

See Also

Color for a complete list of functions; Color data type.