Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES

GLM.UI.Menu.add( menuItem )

GLM.UI.Menu.add( menuItem )

Method for adding a menu item to the menu.

Parameters:

menuItem - The menu item to add to the menu.

Example:

//Assume a tag exists:
var menuBar = new GLM.UI.MenuBar("myMenuBar");

var fileMenu = new GLM.UI.Menu();
fileMenu.setTitle("File"); //create a file menu.
fileMenu.add( {Title: "Open", Tooltip: "Open file", Action: "FileOpen_Click()"} ); //create an "Open" menu item.
menuBar.add(fileMenu); //add the file menu to the menu bar.
menuBar.render(); //renders the control at the tag location.



Overview | IndexGodLikeMouse JavaScript Framework
FRAMES | NO FRAMES