menu.Button Class
Menu button arrow which you can apply to DOM Element to have a menu drop down below it.
Methods
cancelShow
()
This method should be called from function added as event handler to "beforeShow"
Example:
button.addEvent('beforeShow', function(button){ if(!this.isOkToShowButton()){ button.cancel(); } });
Attributes
alwaysVisible
Boolean
default false
Button always visible. When false, it will be visible when mouse enters parent DOM element and hidden when it leaves it
Fires event alwaysVisibleChange
Fires when the value for the configuration attribute alwaysVisible
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
region
String
Position button in this region. Valid values : 'nw','ne','sw' and 'se'
Default: 'ne'
Fires event regionChange
Fires when the value for the configuration attribute region
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
renderTo
String | DOMElement
Render button to this element
Default: undefined
Fires event renderToChange
Fires when the value for the configuration attribute renderTo
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
Events
beforeShow
Event fired before button is shown. You can use this event and call the cancel method if there are situations where you don't always want to show the button
Event Payload:
-
this
menu.Button