Menu

An element, much like a button, that is placed on a menu bar. When the user clicks the menu element, the child Menupopup of the menu will be displayed. This element is also used to create submenus of Menupopup .

<menu label="File">
    <menupopup>    
        <menuitem label="New" onClick="alert(self.label)"/>        
        <menuitem label="Open" onClick="alert(self.label)"/>        
        <menuitem label="Save" onClick="alert(self.label)"/>        
        <menuseparator/>        
        <menuitem label="Exit" onClick="alert(self.label)"/>        
    </menupopup>    
</menu>

Class Name

org.zkoss.zul.Menu

Supported Child Components

Menupopup

Supported Events

*NONE

Properties

*NONE

Methods

Name

Description

Data Type

Values

getMenupopup()

Returns the Menupopup it owns, or null if not available.

Object

<null>

isTopmost()

Returns whether this is an top-level menu, i.e., not owning by another Menupopup.

Values: true | false

Boolean

True

getOutAttrs()

String

insertBefore(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)

boolean

Inherited From