Observable Menu
Package: | Ext.menu |
Defined In: | Menu.js |
Class: | Menu |
Subclasses: | ColorMenu, DateMenu |
Extends: | Observable |
Config Options | Defined By | |
---|---|---|
allowOtherMenus : Boolean
True to allow multiple menus to be displayed at the same time (defaults to false)
|
Menu | |
defaultAlign : String The default {@link Ext.Element#alignTo) anchor position value for this menu relative to its element of origin (defaul...
The default {@link Ext.Element#alignTo) anchor position value for this menu relative to its element of origin (defaults to "tl-bl?")
|
Menu | |
defaults : Object A config object that will be applied to all items added to this container either via the items config or via the add ...
|
Menu | |
items : Mixed
An array of items to be added to this menu. See add for a list of valid item types.
|
Menu | |
listeners : Object A config object containing one or more event handlers to be added to this object during initialization. This should b...
A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once.
|
Observable | |
minWidth : Number
The minimum width of the menu in pixels (defaults to 120)
|
Menu | |
shadow : Boolean/String True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "si...
True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "sides")
|
Menu | |
subMenuAlign : String
The Ext.Element.alignTo anchor position value to use for submenus of this menu (defaults to "tl-tr?")
|
Menu |
Method | Defined By | |
---|---|---|
Menu( Object config ) Creates a new Menu
Creates a new Menu
Parameters:
|
Menu | |
add( Mixed args ) : Ext.menu.Item Addds one or more items of any type supported by the Menu class, or that can be converted into menu items.
Any of the...
Addds one or more items of any type supported by the Menu class, or that can be converted into menu items.
Any of the following are valid:
Parameters:
|
Menu | |
addElement( Mixed el ) : Ext.menu.Item Adds an Ext.Element object to the menu
Adds an Ext.Element object to the menu
Parameters:
|
Menu | |
addEvents( Object object ) : void Used to define events on this Observable
Used to define events on this Observable
Parameters:
|
Observable | |
addItem( Ext.menu.Item item ) : Ext.menu.Item Adds an existing object based on Ext.menu.Item to the menu
Adds an existing object based on Ext.menu.Item to the menu
Parameters:
|
Menu | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] ) : void Appends an event handler to this component
Appends an event handler to this component
Parameters:
|
Observable | |
addMenuItem( Object config ) : Ext.menu.Item Creates a new Ext.menu.Item based an the supplied config object and adds it to the menu
Creates a new Ext.menu.Item based an the supplied config object and adds it to the menu
Parameters:
|
Menu | |
addSeparator() : Ext.menu.Item Adds a separator bar to the menu
Adds a separator bar to the menu
Parameters:
|
Menu | |
addText( String text ) : Ext.menu.Item Creates a new Ext.menu.TextItem with the supplied text and adds it to the menu
Creates a new Ext.menu.TextItem with the supplied text and adds it to the menu
Parameters:
|
Menu | |
fireEvent( String eventName , Object... args ) : Boolean Fires the specified event with the passed parameters (minus the event name).
Fires the specified event with the passed parameters (minus the event name).
Parameters:
|
Observable | |
getEl() : Ext.Element Returns this menu's underlying Ext.Element object
Returns this menu's underlying Ext.Element object
Parameters:
|
Menu | |
hasListener( String eventName ) : Boolean Checks to see if this object has any listeners for a specified event
Checks to see if this object has any listeners for a specified event
Parameters:
|
Observable | |
hide( [Boolean deep ] ) : void Hides this menu and optionally all parent menus
Hides this menu and optionally all parent menus
Parameters:
|
Menu | |
insert( Number index , Ext.menu.Item item ) : Ext.menu.Item Inserts an existing object based on Ext.menu.Item to the menu at a specified index
Inserts an existing object based on Ext.menu.Item to the menu at a specified index
Parameters:
|
Menu | |
isVisible() : void Read-only. Returns true if the menu is currently displayed, else false.
Read-only. Returns true if the menu is currently displayed, else false.
Parameters:
|
Menu | |
on( String eventName , Function handler , [Object scope ], [Object options ] ) : void Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
Parameters:
|
Observable | |
purgeListeners() : void Removes all listeners for this object
Removes all listeners for this object
Parameters:
|
Observable | |
remove( Ext.menu.Item item ) : void Removes an Ext.menu.Item from the menu and destroys the object
Removes an Ext.menu.Item from the menu and destroys the object
Parameters:
|
Menu | |
removeAll() : void Removes and destroys all items in the menu
Removes and destroys all items in the menu
Parameters:
|
Menu | |
removeListener( String eventName , Function handler , [Object scope ] ) : void Removes a listener
Removes a listener
Parameters:
|
Observable | |
resumeEvents() : void Resume firing events. (see suspendEvents)
Resume firing events. (see suspendEvents)
Parameters:
|
Observable | |
show( Mixed element , [String position ], [Ext.menu.Menu parentMenu ] ) : void Displays this menu relative to another element
Displays this menu relative to another element
Parameters:
|
Menu | |
showAt( Array xyPosition , [Ext.menu.Menu parentMenu ] ) : void Displays this menu at a specific xy position
Displays this menu at a specific xy position
Parameters:
|
Menu | |
suspendEvents() : void Suspend the firing of all events. (see resumeEvents)
Suspend the firing of all events. (see resumeEvents)
Parameters:
|
Observable | |
un( String eventName , Function handler , [Object scope ] ) : void Removes a listener (shorthand for removeListener)
Removes a listener (shorthand for removeListener)
Parameters:
|
Observable |