Button"
From Documentation
Jumperchen (talk | contribs) m |
Jumperchen (talk | contribs) |
||
Line 39: | Line 39: | ||
− | + | '''Description: ''' | |
+ | |||
+ | Denotes user has clicked the component. | ||
|- | |- | ||
Line 46: | Line 48: | ||
− | + | '''Description: ''' | |
+ | Denotes user has right-clicked the component. | ||
|- | |- | ||
| <center><tt>onDoubleClick</tt></center> | | <center><tt>onDoubleClick</tt></center> | ||
Line 53: | Line 56: | ||
− | + | '''Description: ''' | |
+ | |||
+ | Denotes user has double-clicked the component. | ||
|- | |- | ||
Line 60: | Line 65: | ||
− | + | '''Description: ''' | |
+ | |||
+ | Denotes when a component gets the focus. | ||
|- | |- | ||
Line 67: | Line 74: | ||
− | + | '''Description: ''' | |
+ | |||
+ | Denotes when a component loses the focus. | ||
Revision as of 03:50, 18 May 2010
Button
- Demonstration: Button and Fileupload
- Java API: Button
- JavaScript API: Button
Employment/Purpose
You could assign a label and an image to a button by the label and image properties. If both are specified, the dir property control which is displayed up front, and the orient property controls whether the layout is horizontal or vertical.
Within ZK 5, the file upload has been redesigned so it can be integrated with any widget. For example, The button can now be used to upload a file. In addition to this, the display of the upload status has been enhanced and can be customized easily.
Example
<button label="Left" image="/img/folder.gif" width="125px"/>
<button label="Right" image="/img/folder.gif" dir="reverse" width="125px"/>
<button label="Above" image="/img/folder.gif" orient="vertical" width="125px"/>
<button label="Below" image="/img/folder.gif" orient="vertical" dir="reverse" width="125px"/>
Fileupload Example
<button upload="true" label="Fileupload"/>
Supported events
MouseEvent
Denotes user has clicked the component. | |
MouseEvent
Denotes user has right-clicked the component. | |
MouseEvent
Denotes user has double-clicked the component. | |
Event
Denotes when a component gets the focus. | |
Event
Denotes when a component loses the focus.
| |
UploadEvent
Description: Denotes user has uploaded a file to the component. |
Supported Children
*NONE
Use cases
Version | Description | Example Location |
---|---|---|
3.6 | Get dynamically generated Button reference in onClick Event | http://www.zkoss.org/forum/listComment/8780 |
3.6 | How to fire onClick Event on a Button | http://www.zkoss.org/forum/listComment/1716 |
Version History
Version | Date | Content |
---|---|---|
5.0.2 | 4/27/2010 | Initialization |