Toolbarbutton"

From Documentation
m
Line 3: Line 3:
 
= Toolbarbutton =
 
= Toolbarbutton =
  
*Demonstration: [http://www.zkoss.org/zkdemo/userguide/#t2 Toolbarbutton]
+
*Demonstration: [http://www.zkoss.org/zkdemo/userguide/#t2 Toolbarbutton] and [http://docs.zkoss.org/wiki/ZK_5:_New_File_Upload#Live_Demo Fileupload]
 
*Java API: <javadoc>org.zkoss.zul.Toolbarbutton</javadoc>
 
*Java API: <javadoc>org.zkoss.zul.Toolbarbutton</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.wgt.Toolbarbutton</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.wgt.Toolbarbutton</javadoc>

Revision as of 03:40, 18 May 2010

Toolbarbutton

Employment/Purpose

The behave of Toolbarbutton is similar to the button except the appearance is different. The button component uses HTML BUTTON tag, while thetoolbarbutton component uses HTML A tag.

A toolbarbutton could be placed outside a toolbar, However toolbarbuttons change their appearance if they are placed inside a toolbar.

Toolbarbutton supports getHref(). If getHref() is not null, the onClick handler is ignored and this element is degenerated to HTML's A tag.

See also : Button, Toolbar

Example

ZKComRef Toolbarbutton Example.png

<window title="toolbar demo" border="normal" width="300px">
	<caption>
		<toolbarbutton label="button3" image="/img/folder.gif" />
		<space />
		<toolbarbutton label="button4" image="/img/folder.gif"
			dir="reverse" />
	</caption>
	<toolbar>
		<toolbarbutton label="button1" image="/img/folder.gif" />
		<space />
		<toolbarbutton label="button2" image="/img/folder.gif" />
	</toolbar>
	<hbox>
		<toolbarbutton label="button5" image="/img/folder.gif"
			orient="vertical" />
		<space />
		<toolbarbutton label="button6" image="/img/folder.gif"
			orient="vertical" dir="reverse" />
	</hbox>
</window>

Supported events

Name
Event Type
onClick
MouseEvent

Description:

Denotes user has clicked the component.

onRightClick
MouseEvent

Description:

Denotes user has right-clicked the component.

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
5.0.2 5/12/2010 Initialization



Last Update : 2010/05/18

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