Skip to main content

TcxColorComboBoxItems.AddColor(TColor,string) Method

Adds a new item with the specified color and description.

Declaration

function AddColor(const AColor: TColor; const ADescription: string): TcxColorComboBoxItem; virtual;

Parameters

Name Type
AColor TColor
ADescription string

Returns

Type
TcxColorComboBoxItem

Remarks

Use the AddColor method to add a new item with the specified color and description. The item is added to the end of the collection. The AColor parameter specifies the color represented by the new item. This value is assigned to the item’s Color property. The ADescription parameter value specifies the description of the color. This value is assigned to the item’s Description property.

Note

if an item is found within the list whose Color property matches the AColor parameter value, the method does nothing and returns nil. Otherwise, a reference to the new item is returned.

To add an item at a specified position within the list, use the InsertColor method.

See Also