z35-groupbox-006.zul

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

ZUL
63
字号
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Robert (dada) --><?page id="testZul" title=" New ZUL Title" cacheable="false" 	language="xul/html" zscriptLanguage="Java" contentType="text/html;charset=UTF-8"?><?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?><zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul/zul.xsd"> Testing Groupbox basic functionality. You should click on the button below once and remove almost everything in the groupbox gb3. Only Caption and a vbox should remain, then test is passed.  <window title="Groupbox test" width="100%">    <groupbox id="gb3" width="100%" mold="3d">      <attribute name="onChildRemoved">    Messagebox.show("Hey You!");    </attribute>      <caption image="/img/inet.png" label="Testing Group Box - Should remain"/>      <vbox id="SomeOtherChildren">      This text should remain.      </vbox>      <vbox id="myChildren">        <combobox>          <comboitem label="Simple and Rich"/>          <comboitem label="Cool!"/>          <comboitem label="Thumbs Up!"/>        </combobox>        <combobox>          <comboitem label="Simple and Rich" description="The simplest way to make Web applications rich"/>          <comboitem label="Cool!" description="The coolest technology"/>          <comboitem label="Ajax and RIA" description="Rich Internet Application by Ajax"/>        </combobox>        <combobox>          <comboitem label="Simple and Rich" image="/img/coffee.gif" description="The simplest way to make Web applications rich"/>          <comboitem label="Cool!" image="/img/corner.gif" description="The coolest technology"/>          <comboitem label="Ajax and RIA" image="/img/cubfirs.gif" description="Rich Internet Application by Ajax"/>        </combobox>        <separator bar="true"/>	Auto-complete:	<combobox id="combo" autodrop="true" use="org.zkoss.zkdemo.userguide.SimpleAutoComplete"/>        <hbox>          <checkbox checked="true" onCheck="combo.autodrop = self.checked" label="auto drop popup when typing"/>          <checkbox checked="true" onCheck="combo.buttonVisible = self.checked" label="button visible"/>        </hbox>      </vbox>    </groupbox>    <hbox>      <vbox>        <button label="Open or Close GroupBox" onClick="gb3.setOpen(!gb3.isOpen());"/>        <checkbox label="Use 3d groupbox" checked="false" onCheck='gb3.mold=self.checked? "3d": "default"'/>      </vbox>      <vbox>        <button label="Dynamically remove a few comonenets.">          <attribute name="onClick"><![CDATA[          Messagebox.show("Try to remove children of gb3");          List list = gb3.getChildren();          for(Iterator it=list.iterator();it.hasNext();){        	  Messagebox.show(it.next().toString());          }          gb3.removeChild(myChildren);             //myChildren.detach();                          ]]></attribute>        </button>      </vbox>    </hbox>  </window></zk>

⌨️ 快捷键说明

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