menu.zul

来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 94 行

ZUL
94
字号
<?xml version="1.0" encoding="UTF-8"?><!--menu.zul{{IS_NOTE        Purpose:        Description:        History:                Thu Nov 13 16:07:16 TST 2008, Created by Flyworld}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer">	<html><![CDATA[		<h4>Menu</h4>	    <p>Menu allows embedded images, vertical/horizontal orientation and nested menupopup/menuitem components.</p>	]]></html>	<separator />
	<tabbox width="100%" tabscroll="false">
		<tabs>
			<tab id="demoView" label="Demo"/>
			<tab id="srcView" label="View Source"/>
		</tabs>
		<tabpanels>
			<tabpanel>
				<window id="view">
				</window>
			</tabpanel>
			
			<tabpanel>
				<panel>
					<panelchildren>
						<textbox id="codeView" class="code" rows="20" width="95%">
			<attribute name="value"><![CDATA[
<zk>	<menubar id="menubar" width="200px">		<menu label="Project" src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png">			<menupopup>				<menuitem src="/img/Centigrade-Widget-Icons/BriefcaseSpark-16x16.png" label="New"					onClick="alert(self.label)" />				<menuitem src="/img/Centigrade-Widget-Icons/BriefcaseOpen-16x16.png" label="Open"					onClick="alert(self.label)" />				<menuitem src="/img/Centigrade-Widget-Icons/DisketteBlack-16x16.png" label="Save"					onClick="alert(self.label)" />				<menuseparator />				<menuitem label="Exit" src="/img/Centigrade-Widget-Icons/DoorOpen-16x16.png" onClick="alert(self.label)" />			</menupopup>		</menu>		<menu label="Help" src="/img/Centigrade-Widget-Icons/QuestionmarkButton-16x16.png">			<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>		<menu src="/img/Centigrade-Widget-Icons/Spyglass-16x16.png">			<menupopup>				<menuitem label="Index" onClick="alert(self.label)" />			</menupopup>		</menu>	</menubar>	<checkbox label="Vertical orient">
		<attribute name="onCheck">
			menubar.orient= self.checked ? "vertical" : "horizontal";
			menubar.width = self.checked ? "100px" : "200px";
		</attribute>
	</checkbox></zk>
			]]></attribute>
						</textbox>
					</panelchildren>
					<toolbar mold="panel">
						<button id="tryBtn" label="Try me!"/>
						<button id="reloadBtn" label="Reload" height="18px"/>
					</toolbar>
				</panel>
			</tabpanel>
		</tabpanels>
	</tabbox></window>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?