Checkbox"

From Documentation
Line 3: Line 3:
 
= Checkbox =
 
= Checkbox =
  
*Demonstration: [http://www.zkoss.org/zkdemo/userguide/#f7 Checkbox]
+
*Demonstration: [http://www.zkoss.org/zkdemo/input/checkbox Checkbox]
 
*Java API: <javadoc>org.zkoss.zul.Checkbox</javadoc>
 
*Java API: <javadoc>org.zkoss.zul.Checkbox</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.wgt.Checkbox</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.wgt.Checkbox</javadoc>
 +
*Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Checkbox | Checkbox]]
  
 
= Employment/Purpose =
 
= Employment/Purpose =
Line 31: Line 32:
 
</source>
 
</source>
  
=Supported events=
+
=Supported Events=
  
 
{| border="1" | width="100%"
 
{| border="1" | width="100%"
 
! <center>Name</center>
 
! <center>Name</center>
 
! <center>Event Type</center>
 
! <center>Event Type</center>
|-
 
| <center><tt>onRightClick</tt></center>
 
|<javadoc>org.zkoss.zk.ui.event.MouseEvent</javadoc>
 
 
 
<tt>'''Description:''' Denotes user has right-clicked the component.</tt>
 
 
|-
 
| <center><tt>onDoubleClick</tt></center>
 
| <javadoc>org.zkoss.zk.ui.event.MouseEvent</javadoc>
 
 
 
<tt>'''Description:''' Denotes user has double-clicked the component.</tt>
 
 
 
|-
 
|-
 
| <center><tt>onFocus</tt></center>
 
| <center><tt>onFocus</tt></center>
| <javadoc>org.zkoss.zk.ui.event.Event</javadoc>
+
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.Event</javadoc>
 
+
Denotes when a component gets the focus.
 
 
<tt>'''Description:''' Denotes when a component gets the focus.</tt>
 
 
 
 
|-
 
|-
 
| <center><tt>onBlur</tt></center>
 
| <center><tt>onBlur</tt></center>
| <javadoc>org.zkoss.zk.ui.event.Event</javadoc>
+
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.Event</javadoc>
 
+
Denotes when a component loses the focus.
 
 
<tt>Description: Denotes when a component loses the focus.</tt>
 
 
 
 
|-
 
|-
 
| <center>onCheck</center>
 
| <center>onCheck</center>
| <javadoc>org.zkoss.zk.ui.event.CheckEvent</javadoc>
+
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.CheckEvent</javadoc>
 
+
Denotes when a component loses the focus.
<tt>Description: Denotes when a component loses the focus.</tt>
 
 
|}
 
|}
 +
*Inherited Supported Events: [[ZK_Component_Reference/Base_Components/LabelImageElement#Supported_Events | LabelImageElement]]
  
 
=Supported Children=
 
=Supported Children=
  
  *ALL
+
  *None
  
=Use cases=
+
=Use Cases=
  
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"
Line 86: Line 67:
  
 
=Version History=
 
=Version History=
 
+
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content

Revision as of 08:34, 19 November 2010

Checkbox

Employment/Purpose

A checkbox.

Example

ZKComRef Checkbox Example.png

<window title="Checkbox demo" border="normal" width="350px">
	<checkbox id="apple" label="Apple" onCheck="doChecked()" />
	<checkbox id="orange" label="Orange" onCheck="doChecked()" />
	<checkbox id="banana" label="Banana" onCheck="doChecked()" />
	<hbox>
		You have selected :
		<label id="fruit2" />
	</hbox>
	<zscript> void doChecked() { fruit2.value = (apple.isChecked() ?
		apple.label+' ' : &quot;&quot;) 
                     + (orange.isChecked() ? orange.label+' ' : &quot;&quot;) 
                     + (banana.isChecked() ? banana.label+' ' : &quot;&quot;);
             }
         </zscript>
 </window>

Supported Events

Name
Event Type
onFocus
Event: Event

Denotes when a component gets the focus.

onBlur
Event: Event

Denotes when a component loses the focus.

onCheck
Event: CheckEvent

Denotes when a component loses the focus.

Supported Children

*None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2010/11/19


Version Date Content
     



Last Update : 2010/11/19

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