Skip to main content

TcxCustomImage.Picture Property

Provides access to the image container that stores the image displayed in the editor.

Declaration

property Picture: TPicture read; write;

Property Value

Type Description
TPicture

Stores the image displayed in the editor.

Use the Picture.Graphic property to access the image container. You need to cast the Picture.[Graphic] property value to the corresponding terminal TGraphic class descendant to access all public API members.

Tip

The Properties.GraphicClass property defines the actual image container type. You can use the Properties.GraphicClass property to switch between registered image container types.

Remarks

You can use the Picture.Graphic property to access the displayed image directly. To clear the editor, you can assign nil (in Delphi) or nullptr (in C++Builder) to the Picture.Graphic property.

Image Container Type

Assign a reference to a TGraphic class descendant to the GraphicClass property to use an instance of the corresponding class as the image container accessible through the image editor’s Picture.Graphic property.

Tip

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

Supported Image Formats

BMP | EMF | GIF | JPEG | PNG | TIFF | WMF
Support for these image formats relies on corresponding native encoders from the Windows Imaging Component (WIC).
SVG
DevExpress controls use our own SVG engine implementation. Refer to the following topic for detailed information on supported SVG elements and their attributes: SVG Image Support.

End-User Functionality

Users can invoke image load, edit, save, and delete commands in the editor’s context menu. You can use the Properties.PopupMenuLayout property to customize the context menu.

VCL Editors Library: The Default Context Menu

Empty Editor Caption

You can use the Properties.Caption property to display a custom caption in the editor when it is empty. For example, you can prompt a user to perform an action:

VCL Editors Library: An Image Editor Caption Example

See Also