Back

SetMenu

SetMenu sets the app menus given by a comma separated list of menu items. When a menu item is selected, the OnMenu function is called.

app.SetMenu( list, iconPath )

Example - Example



function OnStart()
{
    app.SetMenu( "Start,Stop,Pause" );
}

function OnMenu( item )
{
    app.ShowPopup( item, "Short" );
}
    Copy     Copy All       Run      

Example - Menu Images



function OnStart()
{
    menus = "Files:Files.png,Settings:Settings.png";
    app.SetMenu( menus, "/Sys/Img" );
}

function OnMenu( item )
{
    app.ShowPopup( item, "Short" );
}
    Copy     Copy All       Run      

string - comma separated
string - path to file or folder ( "/absolute/..." or "relative/..." )