b30-1901423.zul

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

ZUL
85
字号
<?xml version="1.0" encoding="UTF-8"?><!--B30-1901423.zul{{IS_NOTE	Purpose:			Description:			History:		Fri Feb 29 19:04:36 TST 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk xmlns:n="http://www.zkoss.org/2005/zk/native">	<window title="listbox demo" border="normal">           Click two Align button  and check alignment of listboxes and grids 	<vbox>	<div>	<listbox id="practice" width="250px">	<listhead sizable="true">	<listheader label="1 (Listbox)" />	<listheader label="2" />	<listheader label="3" />	</listhead>	</listbox>	<zscript>	ListitemRenderer renderer = new ListitemRenderer() {	public void render(Listitem item, Object obj) throws Exception {	item.appendChild(new Listcell("One"));	item.appendChild(new Listcell("Two"));	item.appendChild(new Listcell("Three"));	}	};	practice.setModel(new ListModelList());	practice.setItemRenderer(renderer);		</zscript>	<button label="Align" >	<attribute name="onClick">	List innerList = practice.getModel().getInnerList();	practice.setModel(new ListModelList(innerList, true));	practice.getModel().add(new Date());		</attribute>	</button>	</div>	<div>	<grid id="practice1" width="250px">	<columns sizable="true">	<column label="1 (Grid)" />	<column label="2" />	<column label="3" />	</columns>	</grid>	<zscript>	RowRenderer renderer1 = new RowRenderer() {	public void render(Row item, Object obj) throws Exception {	item.appendChild(new Label("One"));	item.appendChild(new Label("Two"));	item.appendChild(new Label("Three"));	}	};	practice1.setModel(new ListModelList());	practice1.setRowRenderer(renderer1);		</zscript>	<button label="Align" >	<attribute name="onClick">	List innerList1 = practice1.getModel().getInnerList();	practice1.setModel(new ListModelList(innerList1, true));	practice1.getModel().add(new Date());		</attribute>	</button>	</div>	</vbox>	</window></zk>

⌨️ 快捷键说明

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