Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxColorComboBoxItems.FindColorItem(TColor) Method

Returns an item representing a specified color.

#Declaration

Delphi
function FindColorItem(const AColor: TColor): TcxColorComboBoxItem; virtual;

#Parameters

Name Type
AColor TColor

#Returns

Type
TcxColorComboBoxItem

#Remarks

Use the FindColorItem method to obtain the combo box item representing a specified color. The color is specified by the AColor parameter. If the specified color is not assigned to the Color property of any item, the method returns nil. Otherwise, it returns a reference to the TcxColorComboBoxItem object representing the item.

The FindColorItem method is useful if you want direct access to the item representing the specified color. For instance, you may want to change the description of the black color item. The code below allows you to do this.

Delphi
var Item: TcxColorComboBoxItem;
// ...
Item := cxColorComboBox1.Properties.Items.FindColorItem(clBlack);
Item.Description := 'Black color description';
See Also