LzContextMenuItem

A menu item within a context menu

Extends Node

The class <LzContextMenuItem> represents a menu item within a context menu.

Attributes

Attributes inherited from Node

class, classroot, cloneManager, datapath, defaultplacement, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes


Methods

setCaption()
LzContextMenuItem.setCaption(caption)

LzContextMenu.setCaption Sets the text string which is displayed for the menu item

Parameters
Name Type Desc
caption String text string to display


setDelegate()
LzContextMenuItem.setDelegate(delegate)

LzContextMenuItem.setDelegate Sets the delegate which will be called when the menu item is selected

Parameters
Name Type Desc
delegate LzDelegate delegate which is executed when item is selected. An onselect event is also sent.


setEnabled()
LzContextMenuItem.setEnabled(val)

LzContextMenu.setEnabled

Parameters
Name Type Desc
val boolean if false, menu item is grayed out and will not respond to clicks


setSeparatorBefore()
LzContextMenuItem.setSeparatorBefore(val)

LzContextMenu.separatorBefore Draw a horizontal separator line before this item in the menu

Parameters
Name Type Desc
val boolean sets visibility of separator line


setVisible()
LzContextMenuItem.setVisible(val)

LzContextMenu.setVisible Sets the function which will be called when the menu item is selected

Parameters
Name Type Desc
val boolean sets visibility


Methods inherited from LzNode

animate, applyConstraint, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption


Events

Events inherited from LzNode

onconstruct, ondata, oninit