Class Ext.Toolbar
Basic Toolbar class.
Properties
-
Methods
-
Events
Public Properties
This class has no public properties.
Public Methods
|
Toolbar( String/HTMLElement/Element container , [Array buttons ], Object config ) |
Toolbar |
Creates a new Toolbar |
|
add( Mixed arg1 , Mixed arg2 , Mixed etc. ) : void |
Toolbar |
Adds element(s) to the toolbar -- this function takes a variable number of
arguments of mixed type and adds them to ... |
|
addButton( Object/Array config ) : Ext.Toolbar.Button/Array |
Toolbar |
Adds a button (or buttons). See Ext.Toolbar.Button for more info on the config. |
|
addDom( Object config ) : Ext.Toolbar.Item |
Toolbar |
Adds a new element to the toolbar from the passed Ext.DomHelper config. |
|
addElement( String/HTMLElement/Element el ) : Ext.Toolbar.Item |
Toolbar |
Adds any standard HTML element to the toolbar |
|
addField( Ext.form.Field field ) : Ext.ToolbarItem |
Toolbar |
Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
been rendered ... |
|
addFill() : Ext.Toolbar.Fill |
Toolbar |
Adds a fill element that forces subsequent additions to the right side of the toolbar |
|
addItem( Ext.Toolbar.Item item ) : Ext.Toolbar.Item |
Toolbar |
Adds any Toolbar.Item or subclass |
|
addSeparator() : Ext.Toolbar.Item |
Toolbar |
Adds a separator |
|
addSpacer() : Ext.Toolbar.Spacer |
Toolbar |
Adds a spacer element |
|
addText( String text ) : Ext.Toolbar.Item |
Toolbar |
Adds text to the toolbar |
|
getEl() : Ext.Element |
Toolbar |
Returns the Element for this toolbar. |
|
insertButton( Number index , Object/Ext.Toolbar.Item/Ext.Toolbar.Button (may ) : Ext.Toolbar.Button/Item |
Toolbar |
Inserts any Ext.Toolbar.Item/Ext.Toolbar.Button at the specified index. |
Public Events
This class has no public events.
Constructor Details
Toolbar
public function Toolbar( String/HTMLElement/Element container
, [Array buttons
], Object config
)
Method Details
add
public function add( Mixed arg1
, Mixed arg2
, Mixed etc.
)
Adds element(s) to the toolbar -- this function takes a variable number of
arguments of mixed type and adds them to the toolbar.
Parameters:
arg1
: MixedThe following types of arguments are all valid:
- Ext.Toolbar.Button config: A valid button config object (equivalent to addButton)
- HtmlElement: Any standard HTML element (equivalent to addElement)
- Field: Any form field (equivalent to addField)
- Item: Any subclass of Ext.Toolbar.Item (equivalent to addItem)
- String: Any generic string (gets wrapped in a Ext.Toolbar.TextItem, equivalent to addText).
Note that there are a few special strings that are treated differently as explained next.
- 'separator' or '-': Creates a separator element (equivalent to addSeparator)
- ' ': Creates a spacer element (equivalent to addSpacer)
- '->': Creates a fill element (equivalent to addFill)
arg2
: Mixedetc.
: Mixed
Returns:
This method is defined by Toolbar.
addButton
public function addButton( Object/Array config
)
This method is defined by Toolbar.
addDom
public function addDom( Object config
)
Adds a new element to the toolbar from the passed
Ext.DomHelper config.
Parameters:
Returns:
Ext.Toolbar.Item
The element's item
This method is defined by Toolbar.
addElement
public function addElement( String/HTMLElement/Element el
)
Adds any standard HTML element to the toolbar
Parameters:
Returns:
Ext.Toolbar.Item
The element's item
This method is defined by Toolbar.
addField
public function addField( Ext.form.Field field
)
Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
been rendered yet. For a field that has already been rendered, use
addElement.
This method is defined by Toolbar.
addFill
public function addFill()
Adds a fill element that forces subsequent additions to the right side of the toolbar
Parameters:
Returns:
Ext.Toolbar.Fill
The fill item
This method is defined by Toolbar.
addItem
public function addItem( Ext.Toolbar.Item item
)
Adds any Toolbar.Item or subclass
This method is defined by Toolbar.
addSeparator
public function addSeparator()
Adds a separator
Parameters:
Returns:
Ext.Toolbar.Item
The separator item
This method is defined by Toolbar.
addSpacer
public function addSpacer()
Adds a spacer element
Parameters:
Returns:
Ext.Toolbar.Spacer
The spacer item
This method is defined by Toolbar.
addText
public function addText( String text
)
Adds text to the toolbar
Parameters:
text
: StringThe text to add
Returns:
Ext.Toolbar.Item
The element's item
This method is defined by Toolbar.
getEl
public function getEl()
Returns the Element for this toolbar.
This method is defined by Toolbar.
insertButton
public function insertButton( Number index
, Object/Ext.Toolbar.Item/Ext.Toolbar.Button (may
)
Inserts any
Ext.Toolbar.Item/
Ext.Toolbar.Button at the specified index.
Parameters:
index
: NumberThe index where the item is to be inserted
(may
: Object/Ext.Toolbar.Item/Ext.Toolbar.Buttonbe Array)} item The button, or button config object to be inserted.
Returns:
This method is defined by Toolbar.