Button

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.

<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"/>

Class Name

org.zkoss.zul.Button

Supported Child Components

*NONE

Supported Events

Name

Event Type

onClick

org.zkoss.zk.ui.event.MouseEvent

Description: Denotes user has clicked the component.

onRightClick

org.zkoss.zk.ui.event.MouseEvent

Description: Denotes user has right-clicked the component.

onDoubleClick

org.zkoss.zk.ui.event.MouseEvent

Description: Denotes user has double-clicked the component.

onFocus

org.zkoss.zk.ui.event.Event

Description: Denotes when a component gets the focus.

onBlur

org.zkoss.zk.ui.even.Event

Description: Denotes when a component loses the focus.

Properties

Property

Description

Data Type

Default Value

dir

Sets the direction of button

Value:normal | reverse

java.lang.String

normal

disabled

Sets whether it is disabled or not

boolean

false

href

Provides a hyper link

java.lang.String

<empty string>

orient

Sets the orientation of button

Value:horizontal | vertical

java.lang.String

horizontal

target

Sets the target frame or window

java.lang.String

<null>

tabindex

Sets the tab order of this component

int

-1

Methods

Name

Description

Return Data Type

isChildable()

Determines whether it accepts child components

Value: false

Note: No child is allowed.

boo lean

Inherited From