[TabAlarm.Custom]Function.Row.ShowHWContextMenu
- Last UpdatedJul 19, 2023
- 1 minute read
Sets your own function to show the context menu to response to the right-clicking of an alarm on the tab style hardware alarm template.
Note: This parameter is available only to projects based on the Tab_Style templates.
Allowable Values:
Name of user defined function which conforms to the following specification:
Syntax
<function>(INT recordAN)
recordAN: Animation Number (AN) of the alarm record
Default Value:
None
Return Value:
0 if run successfully or error code otherwise
Example
[TabAlarm.Custom]
Function.Row.ShowHWContextMenu = MyHardwareContextMenu
INT FUNCTION MyHardwareContextMenu(INT recordAN)
INT selection;
// Show menu
DspPopupMenu(0, "Acknowledge");
selection = DspPopupMenu();
// Run selected command
SELECT CASE selection
CASE 1
IF TabAlarm_GetAckPriv() THEN
KeySetCursor(recordAN);
RETURN AlarmAck(0, 0);
ELSE
Message("Error", ErrMsg(276), 16);
RETURN 276; // no privilege for operation
END
END SELECT
RETURN 0;
END