vcl-cximagecombobox-993d6a2f.md
Stores image combo box editor settings.
TcxImageComboBoxProperties = class(
TcxCustomImageComboBoxProperties
)
The TcxImageComboBoxProperties class implements a collection of image combo box items and related settings that allow you to configure these items.
The list below outlines key members of the TcxImageComboBoxProperties class. These members allow you to manage image combo box items, specify image sources, and configure general editor settings.
DefaultDescription | DefaultImageIndexSpecify the editor’s content when no item is selected.FindItemByValueReturns a combo box editor by its value.ImageAlignAligns the position of images at the drop-down button or at the opposite editor border.Images | LargeImagesSpecify image sources for image combo box items.ItemsProvides access to the collection of image combo box items. You can call the Items.Add function to create new items as demonstrated in the code example below.MultiLineTextSpecifies if the image combo box editor wraps item descriptions in a drop-down window.ShowDescriptionsAllows you to hide the description of an image combo box item in the edit box.
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;
The following public API members reference a TcxImageComboBoxProperties object:
TcxImageComboBox.ActivePropertiesProvides access to active image combo box settings.TcxImageComboBox.PropertiesProvides access to image combo box settings.TcxDBImageComboBox.ActivePropertiesProvides access to active image combo box settings.TcxDBImageComboBox.PropertiesProvides access to image combo box settings.
Show 11 items
TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TcxCustomEditProperties TcxCustomTextEditProperties TcxCustomMaskEditProperties TcxCustomDropDownEditProperties TcxCustomComboBoxProperties TcxCustomImageComboBoxProperties TcxImageComboBoxProperties
See Also