Menubar"

From Documentation
 
(10 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
*Java API: <javadoc>org.zkoss.zul.Menubar</javadoc>
 
*Java API: <javadoc>org.zkoss.zul.Menubar</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menubar</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menubar</javadoc>
*Style Guide: [http://books.zkoss.org/wiki/ZK_Style_Guide/XUL_Component_Specification/Menubar Menubar]
+
*Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Menubar| Menubar]]
  
 
= Employment/Purpose =
 
= Employment/Purpose =
A container that usually contains menu elements.<tt> </tt>
+
A container usually contains more than one menu elements.<code> </code>
  
 
= Example =
 
= Example =
Line 39: Line 39:
 
</menubar>
 
</menubar>
 
</source>
 
</source>
 +
 +
=Properties=
 +
==Scrollable==
 +
The code below demonstrates how easy it is to make the Menubar scrollable!
 +
 +
[[Image:scrollableMenu.gif | center]]
 +
 +
<source lang="xml" highlight="1">
 +
<menubar width="200px" scrollable="true">
 +
...
 +
</menubar></source>
  
 
=Supported Events=
 
=Supported Events=
  
{| border="1" | width="100%"
+
{| class='wikitable' | width="100%"
 
! <center>Name</center>
 
! <center>Name</center>
 
! <center>Event Type</center>
 
! <center>Event Type</center>
Line 57: Line 68:
 
=Use Cases=
 
=Use Cases=
  
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Description !! Example Location
 
! Version !! Description !! Example Location
 
|-
 
|-
Line 66: Line 77:
  
 
=Version History=
 
=Version History=
 
+
{{LastUpdated}}
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-

Latest revision as of 08:55, 17 March 2022

Menubar

Employment/Purpose

A container usually contains more than one menu elements.

Example

ZKComRef Menubar.png

<menubar id="menubar">
	<menu label="File">
		<menupopup onOpen="alert(self.id)">
			<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>
	<menu label="Help">
		<menupopup>
			<menuitem label="Index" onClick="alert(self.label)" />
			<menu label="About">
				<menupopup>
					<menuitem label="About ZK" onClick="alert(self.label)" />
					<menuitem label="About Potix" onClick="alert(self.label)" />
				</menupopup>
			</menu>
		</menupopup>
	</menu>
</menubar>

Properties

Scrollable

The code below demonstrates how easy it is to make the Menubar scrollable!

ScrollableMenu.gif
<menubar width="200px" scrollable="true">
 ...
</menubar>

Supported Events

Name
Event Type
None None

Supported Children

* Menu,  Menuitem,  Menuseparator

Use Cases

Version Description Example Location
     

Version History

Last Update : 2022/03/17


Version Date Content
     



Last Update : 2022/03/17

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.