Back to Devexpress

TcxImageComboBoxProperties Class

vcl-cximagecombobox-993d6a2f.md

latest5.4 KB
Original Source

TcxImageComboBoxProperties Class

Stores image combo box editor settings.

Declaration

delphi
TcxImageComboBoxProperties = class(
    TcxCustomImageComboBoxProperties
)

Remarks

The TcxImageComboBoxProperties class implements a collection of image combo box items and related settings that allow you to configure these items.

Main API Members

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.

Code Example: Create and Configure Image Combo Box Items

The following code example creates and configures four image combo box items:

delphi
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;
cpp
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;

Direct TcxImageComboBoxProperties Class References

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.

Inheritance

Show 11 items

TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TcxCustomEditProperties TcxCustomTextEditProperties TcxCustomMaskEditProperties TcxCustomDropDownEditProperties TcxCustomComboBoxProperties TcxCustomImageComboBoxProperties TcxImageComboBoxProperties

See Also

TcxImageComboBoxProperties Members

cxImageComboBox Unit