Skip to main content

TcxCustomColorComboBoxProperties.NamingConvention Property

Specifies the naming convention for colors displayed within the color combo box.

Declaration

property NamingConvention: TcxColorNamingConvention read; write; default cxncDelphi;

Property Value

Type Default
TcxColorNamingConvention cxncDelphi

Remarks

The NamingConvention property specifies the correspondence between colors and their textual descriptions. If the current naming convention includes a color, this color’s description is displayed within the item. Otherwise, the RGB representation of the color is displayed. The format of displaying RGB codes is specified by the ColorValueFormat property.

The table below describes the values available for the NamingConvention property.

Property’s Value Meaning
cxncDelphi The Delphi naming convention is used. If a color is one of the colors from the standard Delphi set, the corresponding description is displayed. This value is likely to be used when populating the combo box with items using the PrepareDelphiColorList method.
cxncHTML The HTML4 naming convention is used. If a color is one of the colors from the HTML4 set, the corresponding description is displayed. This value is likely to be used when the combo box is populated with items using the PrepareHTML4ColorList method.
cxncX11 The X11 naming convention is used. If a color is one of the colors from the X11 set, the corresponding description is displayed. This value is likely to be used when the combo box is populated with items using the PrepareX11ColorList or PrepareX11OrderedColorList method.
cxncNone No naming convention is used. The Description property of combo box items specifies the display text.

Note that you can also provide description for items using the OnNamingConvention and OnSelectCustomColor events.

The NamingConvention property can also be used to populate the control with items. For this purpose, set the NamingConvention property to a value other than cxncNone and leave the Items collection empty at design-time. In this instance, the control will populate the items list with the color set corresponding to the specified naming convention at application startup. Note that this is equivalent to calling one of the following methods: PrepareDelphiColorList, PrepareHTML4ColorList or PrepareX11ColorList.

The default value of the NamingConvention property is cxncDelphi.

See Also