Skip to main content

TcxPopupMenuItem Enum

Enumerates items of the context menu in unbound and data-aware image editors.

Declaration

TcxPopupMenuItem = (
    pmiCut,
    pmiCopy,
    pmiPaste,
    pmiDelete,
    pmiLoad,
    pmiWebCam,
    pmiSave,
    pmiEdit,
    pmiCustom
);

Members

Name Description
pmiCut

Adds the Cut item to the image editor context menu. This menu item is enabled only if the target editor displays an image.

A click on the Cut item invokes the target editor’s CutToClipboard procedure.

pmiCopy

Adds the Copy item to the image editor context menu. This menu item is enabled only if the target image editor displays an image.

A click on the Copy item calls the target editor’s CopyToClipboard procedure.

pmiPaste

Adds the Paste item to the image editor context menu. This menu item is enabled only if the clipboard contains an image in any supported format.

A click on the Paste item calls the target editor’s PasteFromClipboard method.

pmiDelete

Adds the Delete item to the image editor context menu. This menu item is enabled only if the target editor displays an image.

A click on the Delete item clears the target editor’s image container.

pmiLoad

Adds the Load… item to the image editor context menu.

A click on the Load… item calls the target image editor’s LoadFromFile procedure to invoke the Open dialog.

pmiWebCam

Adds the Assign From Camera… item to the image editor context menu. This menu item is enabled only if at least one camera is available to the camera manager.

A click on the Assign From Camera… item invokes the Camera Preview dialog.

pmiSave

Adds the Save As… item to the image editor context menu. This menu item is enabled only if the target editor displays an image.

A click on the Save As… item calls the target image editor’s SaveToFile procedure to invoke the Save As shell dialog.

pmiEdit

Adds the Edit… item to the image editor context menu. This menu item is enabled only if the target editor displays an image.

A click on the Edit… item calls the target image editor’s ShowImageEditor procedure to invoke the modal Image Editor dialog.

pmiCustom

Adds a custom item at the bottom of the image editor context menu. A separator line delimits the custom item from other menu items.

If this flag is set, you can use Properties.PopupMenuLayout.CustomMenuItemCaption and Properties.PopupMenuLayout.CustomMenuItemGlyph properties of the target image editor to define caption and glyph for the new context menu item.

You can handle the image editor’s Properties.OnCustomClick event to respond to clicks on the custom menu item.

Remarks

The context menu available in unbound and data-aware image editors initially displays all predefined items: Cut, Copy, Paste, Delete, Load…, Assign From Camera…, Save As…, and Edit…:

VCL Editors Library: The Default Context Menu

The TcxPopupMenuItem type enumerates flags that correspond to individual context menu items in image editors. The MenuItems property of the TcxPopupMenuLayout class can include any number of TcxPopupMenuItem flags in any combination to define the list of available context menu items.

Direct TcxPopupMenuItem Type Reference

The TcxPopupMenuItems type references the TcxPopupMenuItem type.

See Also