Back to Devexpress

TcxCustomImage Class

vcl-cximage-d4da7f16.md

latest8.5 KB
Original Source

TcxCustomImage Class

The base class for unbound and data-aware image editors.

Declaration

delphi
TcxCustomImage = class(
    TcxCustomEdit,
    IdxScrollingControl,
    IdxZoomClient,
    IcxTrackBar
)

Remarks

An image editor is designed to store and display an image. Unbound and data-aware image editors allow users to open a context menu to manage and edit images.

Tip

You can use the Properties.PopupMenuLayout.MenuItems property to customize the list of context menu items.

Image editors can use different TGraphic class descendants as image containers. You can use the Properties.GraphicClass property to switch between image container types.

Supported Image Formats

BMP | EMF | GIF | JPEG | PNG | TIFF | WMFSupport for these image formats relies on corresponding native encoders from the Windows Imaging Component (WIC).SVGDevExpress 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.

Image Editor Dialog

Image editors can display a modal Image Editor dialog that allows users to perform simple image edit operations, such as cropping, rotation, and color adjustment.

A user can click the Edit… item in the context menu to display the Image Editor dialog.

Refer to the TcxPopupMenuLayout.MenuItems property description for detailed information on menu item management and a code example.

Main API Members

The list below outlines key members of the TcxCustomImage class that allow you to load and save images as well as configure image editor settings.

Appearance Settings

ParentColorSpecifies if the image editor uses its parent color to fill the background area when no image is displayed.Style | StyleDisabled | StyleFocused | StyleHot | StyleReadOnly

Allow you to define individual appearance settings for different editor states.

Tip

To apply the same style settings to multiple editors, use a TcxEditStyleController component. If you need to apply the same style settings to all editors in your application, you can use a TcxDefaultEditStyleController component.

StylesProvides access to individual styles applied to the image editor in different states.TransparentSpecifies if the image editor is transparent in GDI render mode.

Content-Related API Members

AnimationOptionsProvides access to GIF animation settings.ClipboardFormatSpecifies the active clipboard image format.CopyToClipboard | CutToClipboard | PasteFromClipboardAllow you to perform clipboard operations.LoadFromFileDisplays the Open dialog that allows users to load a supported image file.PictureProvides access to the editor’s image container and allows you to configure its settings.SaveToFileOpens the Save As dialog that allows users to save the displayed image to a file.ShowImageEditorDisplays the modal Image Editor dialog that allows users to perform simple image edit operations.ZoomingOptions

Allows you to zoom the displayed image in or out and customize zoom-related settings.

Note

Zoom operations are available only if the Properties.FitMode property is set to ifmNormal.

Editor Settings and Repository Items

ActivePropertiesProvides access to the current image editor settings regardless of their source. This property set does not allow you to customize image editor settings.GetPropertiesClassReturns the actual editor settings type.PropertiesAllows you to customize image editor settings directly if the editor does not have an assigned repository item.RepositoryItemSpecifies a repository item as an external source of editor settings. A repository item has priority over other editor settings.

General-Purpose API Members

AutoSizeSpecifies if the standalone image editor automatically adjusts its size to fit the displayed image.EnabledSpecifies if the image editor is enabled.ShowHintSpecifies if the standalone image editor can display hints. To enable hints for an in-place image editor in a container control, set its OptionsBehavior.CellHints[1] property to True.Width | HeightAllow you to explicitly define image editor dimensions when the AutoSize property is set to False ( default ).

Terminal TcxCustomImage Class Descendants

Do not use the TcxCustomImage class directly. Use the following descendants instead:

TcxImageAn unbound image editor.TcxDBImageA data-aware image editor.

Implements

IdxScrollingControl

IdxZoomClient

IcxTrackBar

Inheritance

Show 12 items

TObject TPersistent TComponent TControl TWinControl TCustomControl TcxCustomControl TcxControl TcxContainer TcxCustomEditContainer TcxCustomEdit TcxCustomImage

Footnotes

  1. Set the following behavior properties to True or False to enable or disable in-place image editor hints in corresponding container controls:

See Also

TcxCustomImage Members

cxImage Unit