Skip to main content

TcxCustomColorComboBoxProperties.DefaultColor Property

Specifies the color of the color box displayed when no color is selected.

Declaration

property DefaultColor: TColor read; write; default clWindow;

Property Value

Type Default
TColor clWindow

Remarks

There may be situations when no color has been selected (the EditValue property of the control returns nil). See the DefaultColorStyle property description for details on when such situations occur.

If no color is currently selected, the DefaultColorStyle property specifies the appearance of the editor. If it is set to cxdcColor, the editor displays the color box and the string specified by the DefaultDescription property. The color of the color box is specified by the DefaultColor property. This property also sets the color of the hatched brush that populates the color box when the DefaultColorStyle property is set to cxdcHatched.

Images below show samples of the color combo box when the DefaultColor property is set to different values.

Property’s Value DefaultColorStyle is cxdcColor DefaultColorStyle is cxdcHatched
clRed
clGreen

The default value of the DefaultColor property is clWindow.

See Also