Skip to main content

TcxDBImage.Properties Property

Provides access to image editor settings.

Declaration

property Properties: TcxImageProperties read; write;

Property Value

Type Description
TcxImageProperties

Stores image editor settings.

Remarks

You can use the Properties property to access and customize image editor settings if the RepositoryItem property is unspecified. If an image editor repository item is assigned to the RepositoryItem property, all settings accessible through the Properties property have no effect on the image editor.

Note

You can use the ActiveProperties property to identify settings that currently affect the image editor.

Available Options

Use the Properties.Caption property to display a centered text message when the editor displays no image:

VCL Editors Library: An Image Editor Caption Example

Properties.GraphicClassName and Properties.GraphicClass properties allow you to switch between image container types.

Tip

We recommend that you set the Properties.GraphicClass property to TdxSmartImage to ensure that the TcxDBImage editor supports the same image formats as all other DevExpress components.

Refer to the TcxImageProperties class description for detailed information on all available options.

Code Example

The following code example creates a BLOB field in a TdxMemData component and binds a TcxDBImage editor to the field:

uses
  dxGDIPlusClasses;  // This unit declares the TdxSmartImage class
// ...
var
  AFieldDef: TFieldDef;
begin
  if dxMemData1.Active then
    dxMemData1.Close;
  AFieldDef := dxMemData1.FieldDefs.AddFieldDef;
  AFieldDef.Name := 'MyImageField';
  AFieldDef.DataType := ftBlob;
  AFieldDef.CreateField(dxMemData1);
  DataSource1.DataSet := dxMemData1;
  DataSource1.Enabled := True;
  cxDBImage1.DataBinding.DataSource := DataSource1;
  cxDBImage1.DataBinding.DataField := 'MyImageField';
  cxDBImage1.Properties.GraphicClass := TdxSmartImage;  // Selects the universal container
  dxMemData1.Open;
end;
See Also