RasterMenu( [parent] )
Creates a popup menu. The next code fragment illustrates how to create a
commands in a group and add the commands to a menu:
var commands = RasterCommand.createGroup
( myHandler )
commands.add( "new", ICONS16.PAGE, null, "New" );
commands.add( "open", ICONS16.FOLDER, null, "Open" );
commands.add( "save", ICONS16.FLOPPY, null, "Save As..." );
commands("save").setEnabled( false );
var menu = new RasterMenu()
;
menu.add( commands("new") );
menu.add( commands("open") );
menu.add( commands("save") );
:
menu.showAt( 50, 50);
Parameters
Name |
Type |
|
Description |
parent |
object |
optional |
One of the following: a string containing the ID
of a DOM element, a reference to a DOM element, or another
control object. If this argument is not specified or set
null , the menu is created in the BODY element. |