Skip to main content

TcxCustomColorComboBoxProperties.ColorBoxWidth Property

Specifies the width of color boxes displayed within color combo box control items.

Declaration

property ColorBoxWidth: Integer read; write; default 30;

Property Value

Type Default
Integer 30

Remarks

Use the ColorBoxWidth property if you need to change the width of color boxes displayed within color combo box items. The width is specified in pixels. Note that setting this property to 0 hides color boxes.

The height of color boxes is the same as the height of items, which in turn depends on the applied font. The font used to paint color combo box items is specified by the Font property of the control’s current style (for example, the Style.Font property for the control in the normal state).

Note that the ColorBoxWidth property has no effect if the ShowDescriptions property is set to False. In this instance, color combo boxes are expanded to occupy the entire area of the items.

The images below show examples of the color combo box when the ColorBoxWidth property is set to 30 and 15 respectively.

The default value of the ColorBoxWidth property is 30.

See Also