Skip to main content

TcxCustomColorComboBoxProperties.AllowSelectColor Property

Specifies whether a user is allowed to select custom colors.

Declaration

property AllowSelectColor: Boolean read; write; default False;

Property Value

Type Default
Boolean False

Remarks

Set this property to True to allow end-users to select custom colors. In this instance, the editor displays the ellipsis button that invokes the color editor dialog.

Selecting a color that is already in the list, selects the corresponding item of the color combo box. If the selected color is not in the list, a new item is added to the combo box.

You can, however, enforce additional control over custom color selection. To accomplish this, handle the OnSelectCustomColor event to specify whether the selected color should be added to the list. Additionally, you can modify the description of the selected color.

In combination with the DropDownListStyle property, the AllowSelectColor property provides the following logic, geared to help you with design-time customization:

  • Setting the DropDownListStyle property to lsEditList automatically assigns True to the AllowSelectColor property.

  • Setting the AllowSelectColor property to False switches the DropDownListStyle property setting from lsEditList to lsFixedList.

The default value of the AllowSelectColor property is False.

See Also