Checkbox"

From Documentation
Line 11: Line 11:
  
 
= Example =
 
= Example =
 +
[[Image:ZKComRef_Checkbox_Example.png]]
  
 
+
<source lang="xml" >
 
+
<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>
 +
</source>
  
 
=Supported events=
 
=Supported events=

Revision as of 07:47, 12 May 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
None None

Supported Children

*ALL

Use cases

Version Description Example Location
5.0+    

Version History

Version Date Content
5.x.x x/x/20xx Initialization



Last Update : 2010/05/12

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