SiteKiosk Documentation
One Step Back

SetDisabled Method




The SetDisabled method sets the disabled state of an item.


Syntax

    SKMenu.SetDisabled(commandID, bool)
Parameters
    commandIDUINT value that contains the command ID of the item.
    boolBoolean value that specifies the disabled state.
Return Value
    None.
Remarks
    None.
Examples
    The following example creates a HTML dialog containing a menu with submenus, an item can be disabled and enabled.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    function onCommand(ai_Code, ai_CommandID, al_Handle)
    {
       switch (ai_CommandID)
       {
          case 1:
            alert('Item 1');
            break;
          case 3:
            mySubMenu.SetDisabled(1, !mySubMenu.GetDisabled(1));
            break;
       }
    }
    mySubMenu = SiteKiosk.SiteKioskUI.CreatePopupMenu();
    mySubMenu.InsertString(3,1, "Say Item 1", "");
    mySubMenu.InsertString(4,3, "Enable/Disable Item 1", "");
    myMenu = SiteKiosk.SiteKioskUI.CreateMenu();
    myMenu.InsertSubmenu(2,4, mySubMenu.Handle, "MessageBox", "");
    myMenu.InsertString(5,2, "Exit", "");
    mydialog = SiteKiosk.SiteKioskUI.CreateHTMLDialog();
    mydialog.URL = "http://www.myURL.com";
    mydialog.Title = true;
    mydialog.Menu = myMenu.Handle;
    mydialog.OnCommand = onCommand;
    mydialog.ShowDialog();
    </SCRIPT>
    

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

Back to topVolver arriba

© 1997-2011 PROVISIO - Aventura, EEUU - Muenster, Alemania
Sitekiosk.es - Grupo24®, Madrid, España -