PopupMenu Object (IPopupMenu Interface)
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:
Notes:
- The indexing of ABBYY FineReader Engine collections starts with 0.
- The foreach statement in C# (for each in Visual Basic .NET) can be used to manipulate the collection.
Properties
Name | Type | Description |
---|---|---|
Count | int, read-only | Retrieves the number of elements in the custom part of the context menu. The elements are commands and separators. |
CustomMenuEnabled | VARIANT_BOOL, read-only |
Specifies whether the custom part of the context menu is enabled. By default, the value of this property is FALSE. |
Element | MenuItemEnum, read-only | Returns the identifier of the element with the specified index in the custom part of the context menu. |
StandardMenuEnabled | VARIANT_BOOL, read-only |
Specifies whether the standard part of the context menu is enabled. By default, the value of this property is TRUE. |
Methods
Name | Description |
---|---|
Delete | Removes the specified command from the custom part of the context menu. |
DeleteAll | Removes all elements from the custom part of the context menu. |
DeleteAt | Removes the element with the specified position from the custom part of the context menu. |
Has | Allows you to find out whether the custom part of the context menu contains the specified command. |
InsertAt | Inserts the specified command into the specified position in the custom part of the context menu. |
Item | Returns the MenuItemEnum constant corresponding to the element with the specified position in the custom part of the context menu. |
See also
9/17/2024 3:14:41 PM