Skip to main content

TcxImageComboBoxItem.Value Property

Specifies the edit value associated with the image combo box item.

Declaration

property Value: Variant read; write;

Property Value

Type Description
Variant

The edit value of the parent image combo box when the current item is selected.

Remarks

Use the Value property to associate the image combo box item with a unique edit value of the parent image combo box editor.

Note

If two or more image combo box items have the same Value property value, the image combo box editor displays only the first item when one of such items is selected.

Code Example

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;

VCL Editors Library: A Populated Image Combo Box Editor

Default Value

The Value property’s default value is varNull.

See Also