sysTrayAddAction()

Creates an action for the system tray context menu and returns its internal ID.

Synopsis

int sysTrayAddAction(string label, string icon = "", int menu = -1)

Parameter

Parameter Description
label

The text label for the action shown in the context menu.

icon

Optional icon for the action. Filename is relative to the pictures directory.

menu

Target menu for the action. -1 refers to the top-level context menu (not a submenu).

If an unknown menu ID is specified, the function returns -1.

Return Value

Returns the internal ID of the created action on success. Returns -1 if an unknown menu ID is given.

Details

-

sysTrayAddAction

main(mapping event)
                {
                acctionId1TopLevel = sysTrayAddAction("firstAction","StandardIcons/help.svg");
                printResult("sysTrayAddAction() acctionId1="+(string)acctionId1TopLevel );
                
                acctionId2TopLevel = sysTrayAddAction("2ndAction","StandardIcons/help.svg");
                printResult("sysTrayAddAction() acctionId2="+(string)acctionId2TopLevel );
                
                acctionId3TopLevel = sysTrayAddAction("3rdAction","StandardIcons/help.svg");
                printResult("sysTrayAddAction() acctionId3="+(string)acctionId3TopLevel );
                }

Availability

CTRL

Assignment

System Tray