打印版式

Class Ext.Toolbar

Package:Ext
Class:Toolbar
Extends:Object
Subclasses:PagingToolbar
Defined In:Toolbar.js
Basic Toolbar class.

属性   -  方法   -  事件

公共属性

此类没有公共属性。

公共方法

方法 定义对象
  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 t...
  addButton(Object/Array config) : Ext.Toolbar.Button/Array Toolbar
Add 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 DomHelper config
  addElement(String/HTMLElement/Element el) : Ext.Toolbar.Item Toolbar
Adds any standard HTML element to the toolbar
  addField(Field field) : ToolbarItem Toolbar
Add a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have been rendered y...
  addItem(Toolbar.Item item) : Ext.Toolbar.Item Toolbar
Adds any Toolbar.Item or subclass
  addSeparator() : Ext.Toolbar.Item Toolbar
Adds a separator
  addSpacer() : Ext.Toolbar.Item 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/Toolbar.Item/Toolbar.Button (may) : Ext.Toolbar.Button/Item Toolbar
Inserts any Toolbar.Item/Toolbar.Button at the specified index

公共事件

此类没有公共事件。

构造函数

Toolbar

public function Toolbar(String/HTMLElement/Element container, [Array buttons], Object config)
Creates a new Toolbar
参数:
  • container : String/HTMLElement/Element
    The id or element that will contain the toolbar
  • buttons : Array
    (可选) array of button configs or elements to add
  • config : Object
    The config object

方法详情

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.
参数:
  • arg1 : Mixed
    If arg is a Toolbar.Button, it is added. If arg is a string, it is wrapped in a ytb-text element and added unless the text is "separator" in which case a separator is added. Otherwise, it is assumed the element is an HTMLElement and it is added directly.
  • arg2 : Mixed
  • etc : Mixed
返回:
  • void
This method is defined by Toolbar.

addButton

public function addButton(Object/Array config)
Add a button (or buttons), see Ext.Toolbar.Button for more info on the config
参数:
  • config : Object/Array
    A button config or array of configs
返回:
  • Ext.Toolbar.Button/Array
This method is defined by Toolbar.

addDom

public function addDom(Object config)
Adds a new element to the toolbar from the passed DomHelper config
参数:
  • config : Object
返回:
  • 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
参数:
  • el : String/HTMLElement/Element
    The element or id of the element to add
返回:
  • Ext.Toolbar.Item
    The element's item
This method is defined by Toolbar.

addField

public function addField(Field field)
Add 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.
参数:
  • field : Field
返回:
  • ToolbarItem
This method is defined by Toolbar.

addItem

public function addItem(Toolbar.Item item)
Adds any Toolbar.Item or subclass
参数:
  • item : Toolbar.Item
返回:
  • Ext.Toolbar.Item
    The item
This method is defined by Toolbar.

addSeparator

public function addSeparator()
Adds a separator
参数:
  • 无。
返回:
  • Ext.Toolbar.Item
    The separator item
This method is defined by Toolbar.

addSpacer

public function addSpacer()
Adds a spacer element
参数:
  • 无。
返回:
  • Ext.Toolbar.Item
    The spacer item
This method is defined by Toolbar.

addText

public function addText(String text)
Adds text to the toolbar
参数:
  • text : String
    The text to add
返回:
  • Ext.Toolbar.Item
    The element's item
This method is defined by Toolbar.

getEl

public function getEl()
Returns the element for this toolbar
参数:
  • 无。
返回:
  • Ext.Element
This method is defined by Toolbar.

insertButton

public function insertButton(Number index, Object/Toolbar.Item/Toolbar.Button (may)
Inserts any Toolbar.Item/Toolbar.Button at the specified index
参数:
  • index : Number
    The index where the item is to be inserted
  • (may : Object/Toolbar.Item/Toolbar.Button
    be Array)} item The button, or button config object to be inserted.
返回:
  • Ext.Toolbar.Button/Item
This method is defined by Toolbar.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.