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.

Screen

The screen has its own set of fixed context menu items:

  • Copy full path — Copy the full path of the screen's location, either in the BSS or Local file system, to the clipboard. The file name is displayed in the context menu. A temporary file name will be used if the screen is in an "unsaved" state.
  • Facility configuration — Open the Properties for <Facility> dialog box. The facility ID is displayed in the context menu, including resolved facilities if appropriate. If no facility is defined for the screen, this context menu item is not displayed.
  • Show default chart — Navigate to the default chart associated with this screen. See Default Chart for more information.
  • Show historical playback — Click to open the Historical Playback bar to replay historical data for all open screens. See Using Historical Playback for more information.
 

Context menu

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:

  • Current value — Open the Point Properties dialog box
  • Acknowledge alarm — Acknowledge an unacknowledged alarm
  • History Arrow right
    • History values — Open the History Values dialog box
    • Alarm history — Open the Alarm History dialog box
  • Point configuration Arrow right
    • Comments — Open the Comments tab of the PNT Editor
    • Alarm settings — Open the Alarm Settings dialog box for the point type
    • All settings — Open the PNT Editor
    • Questionable state — Open the Edit Questionable State dialog box
    • Alarm suppression — Open the Alarm Suppression Settings dialog box
  • Facility configuration — Open the Properties for <Facility> dialog box
  • Add to chart — Add point values to a default chart
    • New chart — Add values to a new default chart
    • New chart with rollups — Add rolled-up values to a new chart. Four labelled rollup series will be added to the default chart:
      • Real Time — No rollup
      • Min — Calculated minimum
      • Max — Calculate maximum
      • Mean — Calculated mean
    • Chart n — Add values to a previously opened default chart
 

Context menu

Standard context menu
Point configuration

 

Context menu

Standard context menu
Add to chart

The Alarm Grid has a unique set of fixed context menu items:

  • Acknowledge alarm — Acknowledge an alarm
  • Clear alarm — Clear the alarm
  • Force clear alarm — Remove an alarm associated with a specified point tag that has not been reset or acknowledged
  • Hide alarm... — Hide the alarm
  • Unhide alarm — Unhide the alarm
  • Alarm suppression... — Suppress an alarm on an ad hoc basis
 

Context menu

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 Configure custom context menu items 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.