A general purpose element, used by widgets which need a button-like control.
The :mcs-disabled pseudo-class may be used to specify styles for a button in the disabled state.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
action | Specifies an action to be invoked when the button is clicked | xs:string | enable, disable, invoke, show, hide, clear-content, show-content, hide-content, press, dismiss, next-month, next-year, previous-month, previous-year, set-today, first-page, last-page, next-page, previous-page, next-row, previous-row, force-sync, clear-value, execute, reset, split, start, stop, launch | optional |
Action | Description |
---|---|
disable | Disables the button |
enable | Enables the button |
press | Presses the button. This action is enabled only when the button itself is enabled. |
Property | Description | Type | Access |
---|---|---|---|
is-enabled | Specifies whether or not the button is enabled. When a button is associated with an action, this property is a mirror of the is-enabled property of the corresponding action. In such cases this property is not writable. | xs:boolean | read/write |
Event | Description |
---|---|
pressed | The event is sent when the button is pressed |
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget">
<head>
<title>widget:button</title>
</head>
<body>
<div>
<widget:button action="myPopup#show">click me!</widget:button>
</div>
<widget:popup id="myPopup">
<div>Hello!</div>
<widget:dismiss>X</widget:dismiss>
</widget:popup>
</body>
</html>