ShowPopupMenu Method



 
The ShowPopupMenu method shows the popup menu.


Syntax

    [commandID=] SKMenu.ShowPopupMenu(x, y)
Parameters
    x Integer value that contains the horizontal position.
    y Integer value that contains the vertical position.
Return Value
    Returns an UINT value containing the command ID of the popup menu.
Remarks
    Use this method if the popup menu is not used as a submenu.
Examples
    The following example shows a context menu when the right mouse button is clicked.

    <html>
    <head>
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    mySubMenu = SiteKiosk.SiteKioskUI.CreatePopupMenu();
    mySubMenu.InsertString(2,1, "Entry 1", "");
    mySubMenu.InsertString(3,2, "Entry 2", "");
    mySubMenu.InsertString(4,3, "Entry 3", "");
    mySubMenu.InsertString(5,4, "Entry 4", "");
    mySubMenu.InsertString(6,5, "Entry 5", "");
    function showmenu()
    {
       if (event.button == 2)
       {
          xpos = event.clientX;
          ypos = event.clientY + 120;
          cmdID = mySubMenu.ShowPopupMenu(xpos, ypos);
       }
    }
    </SCRIPT>
    </head>
    <body onmousedown="showmenu()">
    Click the right mouse button to show a popup menu.
    </body>
    </html>
    

Applies to
    SiteKiosk v5.5 (and later versions).

Back to top