vcl-cximage.md
An unbound image editor.
TcxImage = class(
TcxCustomImage
)
The TcxImage control stores and displays an image. Context menu items include clipboard operations, open/save file commands, and a shortcut to the Image Editor Dialog.
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.
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.
Tip
We recommend that you set the Properties.GraphicClass property to TdxSmartImage to ensure that the TcxImage editor supports all of these formats.
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 image editor’s 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.
The list below outlines key members of the TcxImage class that allow you to load and save images as well as configure image editor 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
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 allow users to perform simple image edit operations.ZoomingOptionsAllows you to zoom the displayed image in or out and customize zoom-related settings.
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.
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 ).
You can create a TcxEditRepositoryImageItem component in an edit repository to define an unbound image editor, store image editor settings, and share them between multiple image editors.
Show 13 items
TObject TPersistent TComponent TControl TWinControl TCustomControl TcxCustomControl TcxControl TcxContainer TcxCustomEditContainer TcxCustomEdit TcxCustomImage TcxImage
Footnotes
True or False to enable or disable in-place image editor hints in corresponding container controls:See Also