new ToolButton(buttonID, buttonType, options)
The class defines a toolbar button.
It fires various events which are instances of OM.event.ToolbarEvent
.
Applications wish to customize a built-in toolbar button's behavior or add a
custom toolbar button should add listeners to such events such as when a toolbar button
is in 'up' or 'down' state.
Parameters:
Name | Type | Description |
---|---|---|
buttonID |
String | A button id |
buttonType |
int | The button type. One of three pre-defined values |
options |
Object | An object, or literal, specifying the button parameters. It can have the following attributes:
|
- Mixes In:
Fires:
- event:ToolbarEvent
Returns:
The newly created ToolButton object.
Members
-
<static, constant> COMMAND :Number
-
Represents a COMMAND type toolbar button.
Type:
- Number
-
<static, constant> SEPARATOR :Number
-
Represents a SEPARATOR type toolbar button.
Type:
- Number
-
<static, constant> TOGGLE :Number
-
Represents a TOGGLE type toolbar button.
Type:
- Number
Methods
-
on()
-
A shorthand name for the member function addListener.
- Mixes In:
-
setToolTip(tooltip)
-
Set the button's tooltip. It is the text displayed on hover or mouseover.
Parameters:
Name Type Description tooltip
String The tooltip content.
Returns:
- Type
- void