LzContextMenu
A contextual menu

JavaScript: LzContextMenu
extends <node> » LzEventable »

The <LzContextMenu> represents a context (right-click) menu.

Attributes

Name Type (tag) Type (js) Default Category
items       read/write
   
kernel       read/write
   

Methods

addItem()
LzContextMenu.addItem(item : LzContextMenuItem);
Adds a menu items into a menu
Parameter Name Type Description
item LzContextMenuItem LzContextMenuItem to install on this menu

clearItems()
LzContextMenu.clearItems();
Remove all custom items from a menu

getItems()
LzContextMenu.getItems();
Return list of custom items

hideBuiltInItems()
LzContextMenu.hideBuiltInItems();
Removes Flash-installed default menu items

LzContextMenu()
LzContextMenu.LzContextMenu(del);
Parameter Name Type Description
del    

makeMenuItem()
LzContextMenu.makeMenuItem(title : String, callback : function);
create a new menu item for a LzContextMenu
Parameter Name Type Description
title String menu item name
callback function delegate to execute when item is selected

setDelegate()
LzContextMenu.setDelegate(delegate : LzDelegate);
Sets the delegate which will be called when the menu is opened
Parameter Name Type Description
delegate LzDelegate delegate which is executed when item is selected. An onmenuopen event is also sent.

Methods inherited from LzEventable

destroy, setAttribute

Events

Name Description
onmenuopen  

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from LzEventable

ondestroy