Vcl.ExtCtrls.TColorBoxStyles

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TColorBoxStyles = (cbStandardColors, // first sixteen RGBI colors
cbExtendedColors, // four additional reserved colors
cbSystemColors,   // system managed/defined colors
cbIncludeNone,    // include clNone color, must be used with cbSystemColors
cbIncludeDefault, // include clDefault color, must be used with cbSystemColors
cbCustomColor,    // first color is customizable
cbPrettyNames,
cbCustomColors);  // All colors are custom colors

C++

enum DECLSPEC_DENUM TColorBoxStyles : unsigned char { cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbIncludeDefault, cbCustomColor, cbPrettyNames, cbCustomColors };

Properties

Type Visibility Source Unit Parent
enum public
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls Vcl.ExtCtrls

Description

TColorBoxStyles and TColorBoxStyle specify how a color box control displays its selections.

The following table lists the possible values of TColorBoxStyle:

Style Meaning when included

cbStandardColors

The color box lists the first 16 color constants from the Graphics unit. These are the constants such as clRed or clBlack, that represent fixed RGB values.

cbExtendedColors

The color box includes clMoneyGreen, clSkyBlue, clCream, and clMedGray.

cbSystemColors

The color box includes the symbolic color constants that reflect the values specified in the Windows control panel.

cbIncludeNone

The color box includes clNone. This option only has an effect if Style includes cbSystemColors.

cbIncludeDefault

The color box includes clNone. This option only has an effect if Style includes cbSystemColors.

cbCustomColor

The first entry in the color box represents a custom color. When you select the Custom entry, the color box displays the Color selection dialog, where you can specify a custom color.

cbPrettyNames

The color box lists the names as words rather than as the color constant strings (for example 'Black' rather than 'clBlack').

cbExtendedColors

The color box lists a customized list of colors. Use the OnGetColors event to populate this list of colors (the displayed name and corresponding color).

Note: The cbCustomColor value allows you to select only a custom color from the ColorDialog that is opened.
Note: In the OnGetColors event, you can add as many colors as you want to the color box list.

See Also