Method

HighlightColor


Warning

This item was deprecated in version 2019r2. Please use Color.HighlightColor as a replacement.

Description

Returns the operating system's highlight color.

Usage

result=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.

Sample code

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.ForeColor = White
g.DrawLine(1, 1, g.Width, 1)
g.DrawLine(1, g.Height - 1, 1, 1)
g.ForeColor = 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.ForeColor = HighlightColor
g.FillRect(2, 2, g.Width - 3, g.Height - 3)

Compatibility

All project types on all supported operating systems.