[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ColorBox' (#lcl)

# TCustomColorBox.Style

Settings which determine the colors available in the control and their display style.

## Declaration

Source position: colorbox.pas line 84

`public property TCustomColorBox.Style : TColorBoxStyle read FStyle write SetStyle default [cbStandardColors, cbExtendedColors, cbSystemColors];`

## Description

Style is a TColorBoxStyle property with settings to determine the colors available in the control and their display style. Include values from the TColorBoxStyles enumeration to enable a particular setting. For instance:

cbStandardColors
  16 standard colors (as defined in graphics.pp); like cRed, clBlack, et. al.
cbExtendedColors
  4 extended colors (as defined in graphics.pp); like clMoneyGreen, clSkyBlue, et. al.
cbSystemColors
  System colors (as defined in graphics.pp); like clScrollBar, clWindow, clForm, .et. al.
cbIncludeNone
  Includes clNone in the list of colors.
cbIncludeDefault
  Includes clDefault in the list of colors.
cbCustomColor
  The first color is customizable by selection from a dialog.
cbPrettyNames
  Uses "pretty" names in the color names instead of the color value; like Red for clRed.
cbCustomColors
  Uses the OnGetColors event handler to get the list of colors.

The default value for the property is: [cbStandardColors, cbExtendedColors, cbSystemColors]. This enables the corresponding TColor values defined in the graphics.pp unit. By including cbCustomColor in Style, the custom color is stored as the first value in the Colors property.

Setting a new value for the property causes the SetColorList method to be called to reload the color names and values.

## See also

TCustomColorBox.SetColorList |  | Loads the list of colors used in the control.
TColorBoxStyles |  | Represents the available colors and the name display style used in color controls.
TColorBoxStyle |  | Set type used to store values from the TColorBoxStyles enumeration.