Configuring a Context Menu
The Canvas screen and many controls support a right-click context menu that is available in run mode. Each context menu contains a set of standard (fixed) menu items, which may differ depending on the screen or control, and optionally any configured custom context menu items, which can be scripted to support customized screen and control behavior.
Standard Context Menu Items
For the screen the context menu with fixed items is always available. There is no option to turn it off.
ScreenThe screen has its own set of fixed context menu items: |
||
|
Screen context menu
|
|
Controls
For the controls the context menu with fixed items is optional. The context menu is configured via the Show context menu property in the Property pane for the control — The Show context menu check box indicates whether a right-click context menu will be available or suppressed in run mode. The default context menu will allow alarm acknowledgment, access to point history and alarm history, point configuration, and facility configuration.
|
The standard context menu for controls and the CygNet grid displaying point data displays the following fixed items: |
||
|
Standard context menu
Standard context menu |
|
|
The Alarm Grid has a unique set of fixed context menu items: |
||
|
Alarm grid context menu |
|
Custom Context Menu Items
Canvas supports scripted context menu items, in addition to the standard context menu items that display in run mode. A custom context menu item will call an event into script allowing customized control behavior. The custom context menu options will appear at the bottom of the fixed context menu options, separated by a line.
Relevant Property
Context menu items — The Custom Context Menu Configuration dialog box is where you configure any custom context menu items that will appear in the right-click context menu for the screen or control. Each custom context menu item will call an event into script so that you can customize screen or control behavior. The custom context menu options will appear at the bottom of the fixed context menu options, separated by a line. Each custom context menu item has a title and an event script ID; items can be designated as a separator; and custom context menus support nested menu items. Click
to open the Custom Context Menu Configuration dialog box.
Relevant Script Event
Custom Context Menu Action — The Custom Context Menu Action event is called when the custom context menu item is clicked. A Script event ID (configured for each custom context menu item in the Context Menu Items property for the screen or control) is passed in along with other relevant information in the context of the click, for example, facility or point tag, as appropriate.
