Skip to main content
A newer version of this page is available. .

TcxImageComboBoxItems.Items Property

Provides indexed access to image combo box items.

Declaration

property Items[Index: Integer]: TcxImageComboBoxItem read; write; default;

Property Value

Type
TcxImageComboBoxItem

Remarks

Use this property to access individual items displayed within an image combo box. The Index parameter value represents the item position within the TcxImageComboBoxItems collection. The Items property provides an editor window for customizing the TcxImageComboBoxItems collection at design time. To invoke this editor window, switch to the Object Inspector and click the ellipsis button next to the image combo box editor’s Properties.Items property.

In the editor window, you can do the following:

The Image column in this window displays the image associated with an item (if any) and its index. The ValueType column represents the string representation of the value type to which the string value specified in the Value field is converted when the item’s Value property is assigned. Other columns in this window correspond to item properties and display their values.

The functions which are available within this window are listed in the following table:

Button

Function

colspan=”2” |

Add

Adds a new item as the last item to the TcxImageComboBoxItems collection. When the image combo box has an image list assigned via the Properties.Images and Properties.LargeImages lists, the image in the list is automatically associated with the new item. The item’s ImageIndex in this case will correspond to the current item’s index within the collection. For instance, the first item in the collection with an index of 0 will have its ImageIndex property assigned to 0 and thus the image with this index in the Properties.Images collection will be displayed in the ‘Image‘ column. Since the ImageIndex property’s value is determined, sorting (if any) is applied to the items and affects the items’ actual position within the collection.

Insert

Unlike the Add function, this one inserts a new item into the TcxImageComboBoxItems collection at the position specified by the currently selected item, thus moving the selected item and the items that follow it down the collection. Again, the inserted item’s ImageIndex corresponds to the current item’s index within the collection. Since the ImageIndex property’s value is determined, sorting (if any) is applied for items, which affects the actual items’ positions within the collection.

Delete

Deletes the currently selected item from the TcxImageComboBoxItems collection.

Select All

Selects all items within the TcxImageComboBoxItems collection.

Set ValueType

Use the dropdown list to select and set the value type for selected items. The value type can be selected for a particular item in the collection by populating the list within the ‘ValueType‘ field.

OK

Saves all the items and their properties within the editor window to the control’s item collection and closes the editor window.

Cancel

Discards all the TcxImageComboBoxItems collection’s items’ modifications within the editor window and closes it.

You can sort items within the editor window by clicking the corresponding column captions.

See Also