Skip to main content
Visual Components are implemented in FRE for Windows.
This object represents a context menu of a Visual Component. The context menu of each component has a standard part and a custom part:
  • The standard part of the context menu is the context menu which is displayed in the component by default. This part cannot be changed. You can only display or hide from the display this part of the menu using the StandardMenuEnabled property.
  • The custom part of the context menu can be edited. By default, it is empty. You can add any of the standard commands available for the component or any custom commands to this part of the context menu. The custom part of the context menu is always displayed after the standard part. The custom part of the context menu can be enabled or disabled too — use the CustomMenuEnabled property. Note that all indexed properties and methods use the index in the collection of commands in the custom part of the context menu.
The following Visual Components have a context menu: ImageViewer, ZoomViewer, TextEditor, DocumentViewer. See the list of available commands and the commands which can be used in the context menu:

Properties

NameTypeDescription
Countint, read-onlyRetrieves the number of elements in the custom part of the context menu. The elements are commands and separators.
CustomMenuEnabledVARIANT\_BOOL, read-onlySpecifies whether the custom part of the context menu is enabled. By default, the value of this property is FALSE.
ElementMenuItemEnum, read-onlyReturns the identifier of the element with the specified index in the custom part of the context menu.
StandardMenuEnabledVARIANT\_BOOL, read-onlySpecifies whether the standard part of the context menu is enabled. By default, the value of this property is TRUE.

Methods

NameDescription
DeleteRemoves the specified command from the custom part of the context menu.
DeleteAllRemoves all elements from the custom part of the context menu.
DeleteAtRemoves the element with the specified position from the custom part of the context menu.
HasAllows you to find out whether the custom part of the context menu contains the specified command.
InsertAtInserts the specified command into the specified position in the custom part of the context menu.
ItemReturns the MenuItemEnum constant corresponding to the element with the specified position in the custom part of the context menu.

See also

IImageViewer::PopupMenu IDocumentViewer::PopupMenu ITextEditor::PopupMenu ITextValidator::PopupMenu Working with Collections Working with Properties