Skip to main content

TcxCustomColorComboBoxProperties.DefaultColorStyle Property

Specifies the appearance of the control when no color is selected.

Declaration

property DefaultColorStyle: TcxDefaultColorStyle read; write; default cxdcColor;

Property Value

Type Default
TcxDefaultColorStyle cxdcColor

Remarks

Color combo box controls do not require that a color be selected. By default, no color is selected at application startup. End-users can also force the editor to accept this state by pressing the ESC key. Also, lack of a selected color can occur when the AddToList parameter of the OnSelectCustomColor event is set to False. (The AllowSelectColor property must be set to True to allow custom colors to be selected.)

The appearance of the editor when no color is selected is provided by the DefaultColorStyle property. The following values are available:

Property’s Value Meaning Effect
cxdcClear The color box is populated with the same color as the background.
cxdcColor The color box is populated with the color specified by the DefaultColor property.
cxdcHatched The box has a diagonal hatch brush. The brush color is specified by the DefaultColor property.
cxdcText The color box is not displayed.
cxdcCustom Handle the OnGetDefaultColor event to provide a custom color.

Note

The text displayed when no color is selected is specified by the DefaultDescription property. Text visibility is specified by the ShowDescriptions property.

The default value of the DefaultColorStyle property is cxdcColor.

See Also