📄 z35-button-003.zul
字号:
<?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">
<window title="Test button reference to processes" border="normal" width="400px">
Test button basic functions: onclick, disable, rightclick, doubleclick, onFocus(click near button and TAB into button), onBlur (TAB away from button), href should all be working, if any failed, its bug.
<zscript><![CDATA[
public void setMyLabel(String str){
self.setLabel(str);
}
public void setDisableMe(){
self.setDisabled(true);
self.setLabel("Disabled OK");
}
]]></zscript>
<vbox>
<hbox>
<button label="ClickMe" onClick='setMyLabel("OnClick OK")'/>Single Click test</hbox>
<hbox>
<button label="ClickMe" onClick="setDisableMe()"/> Disable Test </hbox>
<hbox>
<button label="RightClickMe" onRightClick='setMyLabel("RightClick OK")'/> Right Click Test </hbox>
<hbox>
<button label="DoubleClickMe" onDoubleClick='setMyLabel("DoubleClick OK")'/> Double Click Test</hbox>
<hbox>
<button label="FocusOnMe" onFocus='setMyLabel("Focused OK")' tabindex="1"/>Focus gained Test </hbox>
<hbox>
<button label="BlurMe" onBlur='setMyLabel("Blurred OK")' tabindex="2"/>Focus lost Test </hbox>
<hbox>
<button label="http://www.google.com" href="http://www.google.com"/> Hyperlink Test </hbox>
</vbox>
</window>
</zk>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -