vcl-cximagecombobox-dot-tcximagecombobox-6d4b10f1.md
Provides access to image combo box settings.
property Properties: TcxImageComboBoxProperties read; write;
| Type | Description |
|---|---|
| TcxImageComboBoxProperties |
Stores image combo box settings.
|
You can use the Properties property to access and customize image combo box settings if the RepositoryItem property is unspecified. If an image combo box repository item is assigned to the RepositoryItem property, all settings accessible through the Properties property have no effect on the image combo box.
Note
You can use the ActiveProperties property to identify settings that currently affect the image combo box editor.
You can use the Properties.Items property to manage and configure individual image combo box items. Properties.Images and Properties.LargeImages properties allow you to specify sources of images for image combo box items.
Refer to the TcxImageComboBoxProperties class description for detailed information on all available options.
The following code example creates and configures four image combo box items:
var
AItem: TcxImageComboBoxItem;
AProperties: TcxImageComboBoxProperties;
begin
AProperties := cxImageComboBox1.Properties;
AProperties.BeginUpdate;
try
AItem := AProperties.Items.Add;
AItem.ImageIndex := 0;
AItem.Description := 'Dr';
AItem.Value := 0;
AItem := AProperties.Items.Add;
AItem.ImageIndex := 1;
AItem.Description := 'Mr';
AItem.Value := 1;
AItem := AProperties.Items.Add;
AItem.ImageIndex := 2;
AItem.Description := 'Ms';
AItem.Value := 2;
AItem := AProperties.Items.Add;
AItem.ImageIndex := 3;
AItem.Description := 'Mrs';
AItem.Value := 3;
finally
AProperties.EndUpdate;
end;
cxImageComboBox1.EditValue := 0;
end;
TcxImageComboBoxItem *AItem;
TcxImageComboBoxProperties *AProperties;
// ...
AProperties = cxImageComboBox1->Properties;
AProperties->BeginUpdate();
try
{
AItem = AProperties->Items->Add();
AItem->ImageIndex = 0;
AItem->Description = "Dr";
AItem->Value = 0;
AItem = AProperties->Items->Add();
AItem->ImageIndex = 1;
AItem->Description = "Mr";
AItem->Value = 1;
AItem = AProperties->Items->Add();
AItem->ImageIndex = 2;
AItem->Description = "Ms";
AItem->Value = 2;
AItem = AProperties->Items->Add();
}
__finally
{
AProperties->EndUpdate();
}
cxImageComboBox1->EditValue = 0;
See Also
TcxImageComboBox.ActiveProperties Property