A newer version of this page is available. Switch to the current version.

ImageComboBoxItemCollection.Add(ImageComboBoxItem) Method

Adds a new item to the current collection.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

public int Add(
    ImageComboBoxItem item
)

Parameters

Name Type Description
item ImageComboBoxItem

A new item to insert into the collection.

Returns

Type Description
Int32

The position into which the new element was inserted.

Remarks

The Add method allows you to add a new element to the collection. The new element to insert is identified by the item parameter. This represents an instance of the ImageComboBoxItem class and describes the item's value, caption and image index. You can also customize the item at a later time by accessing it using the ImageComboBoxItemCollection.Item indexer.

To add an array of items at once, use the ImageComboBoxItemCollection.AddRange method instead.

Note: To ensure proper functionality of the ImageComboBoxEdit control, item values must be unique within the collection.

See Also