Colorbox"

From Documentation
 
(10 intermediate revisions by 5 users not shown)
Line 3: Line 3:
 
= Colorbox =
 
= Colorbox =
  
*Demonstration: [http://www.zkoss.org/zkdemo/userguide/#f2 link]
+
*Demonstration: [http://www.zkoss.org/zkdemo/input/color_picker Colorbox]
 
*Java API: <javadoc>org.zkoss.zkex.zul.Colorbox</javadoc>
 
*Java API: <javadoc>org.zkoss.zkex.zul.Colorbox</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zkex.inp.Colorbox</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zkex.inp.Colorbox</javadoc>
 +
*Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Colorbox | Colorbox]]
 +
{{ZK PE}}
  
 
= Employment/Purpose =
 
= Employment/Purpose =
 
A Colorbox used to retrieve an input that the user can select a color.  
 
A Colorbox used to retrieve an input that the user can select a color.  
 
 
  
 
= Example =
 
= Example =
Line 19: Line 19:
 
<colorbox color="#FFFFFF" />
 
<colorbox color="#FFFFFF" />
 
</source>
 
</source>
 +
 +
 +
= Key control =
 +
 +
{{versionSince| 6.0.0}}
 +
 +
Pressing left, right, up, or down arrow keys to change the selected color.
 +
 +
= Colorbox in Menu =
 +
By setting <code>content</code> attribute of <code><menu></code> to create a colorbox in menu.
  
 
[[Image:ZKComRef_Colorbox_Examples2.PNG]]  
 
[[Image:ZKComRef_Colorbox_Examples2.PNG]]  
<source lang="xml" >
 
<menubar id="menubar" width="100%">
 
<menu image="/img/Centigrade-Widget-Icons/Spyglass-16x16.png">
 
<menupopup>
 
<menuitem label="Index" onClick="alert(self.label)" />
 
<menu label="Color Picker" content="#color=#184dc6"/>
 
</menupopup>
 
</menu>
 
</menubar>
 
</source>
 
  
=Supported events=
+
<syntaxhighlight lang="xml" highlight='5'>
 +
    <menubar id="menubar" width="100%">
 +
        <menu label="Color" iconSclass="z-icon-binoculars">
 +
            <menupopup>
 +
                <menuitem label="Index" onClick="alert(self.label)" />
 +
                <menu label="Color Picker" content="#color=#184dc6"/>
 +
            </menupopup>
 +
        </menu>
 +
    </menubar>
 +
</syntaxhighlight>
 +
 
 +
=Supported Events=
  
{| border="1" | width="100%"
+
{| class='wikitable' | width="100%"
 
! <center>Name</center>
 
! <center>Name</center>
 
! <center>Event Type</center>
 
! <center>Event Type</center>
Line 40: Line 51:
 
| <center>onChange</center>
 
| <center>onChange</center>
 
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.InputEvent</javadoc>
 
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.InputEvent</javadoc>
 
 
Notifies the application with the onChange event if its content is changed
 
Notifies the application with the onChange event if its content is changed
 +
|}
 +
*Inherited Supported Events: [[ZK_Component_Reference/Base_Components/XulElement#Supported_Events | XulElement]]
  
|}
 
  
 
=Supported Children=
 
=Supported Children=
  
  *ALL
+
  *None
  
=Use cases=
+
=Use Cases=
  
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Description !! Example Location
 
! Version !! Description !! Example Location
 
|-
 
|-
Line 60: Line 71:
  
 
=Version History=
 
=Version History=
 
+
{{LastUpdated}}
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 5.0.2
+
| &nbsp;
| 5/18/2010
+
| &nbsp;
| Initialization
+
| &nbsp;
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Latest revision as of 09:53, 17 March 2022

Colorbox

  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion pe-ee.png

Employment/Purpose

A Colorbox used to retrieve an input that the user can select a color.

Example

ZKComRef Colorbox Examples.PNG

<colorbox color="#FFFFFF" />


Key control

Since 6.0.0

Pressing left, right, up, or down arrow keys to change the selected color.

Colorbox in Menu

By setting content attribute of <menu> to create a colorbox in menu.

ZKComRef Colorbox Examples2.PNG

    <menubar id="menubar" width="100%">
        <menu label="Color" iconSclass="z-icon-binoculars">
            <menupopup>
                <menuitem label="Index" onClick="alert(self.label)" />
                <menu label="Color Picker" content="#color=#184dc6"/>
            </menupopup>
        </menu>
    </menubar>

Supported Events

Name
Event Type
onChange
Event: InputEvent

Notifies the application with the onChange event if its content is changed


Supported Children

*None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2022/03/17


Version Date Content
     



Last Update : 2022/03/17

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