Posted on 2009-03-04 10:43
Robert Su 閱讀(512)
評論(0) 編輯 收藏
Ext2.0對框架進行了非常大的重構,其中最重要的就是形成了一個結構及層次分明的組件體系,由這些組件形成了Ext的控件,Ext組件是由
Component類定義,每一種組件都有一個指定的xtype屬性值,通過該值可以得到一個組件的類型或者是定義一個指定類型的組件。
組件大致可以分成三大類,即基本組件、工具欄組件、表單及元素組件。
基本組件有:
xtype Class
------------- ------------------
box Ext.BoxComponent 具有邊框屬性的組件
button Ext.Button 按鈕
colorpalette Ext.ColorPalette 調色板
component Ext.Component 組件
container Ext.Container 容器
cycle Ext.CycleButton
dataview Ext.DataView 數據顯示視圖
datepicker Ext.DatePicker 日期選擇面板
editor Ext.Editor 編輯器
editorgrid Ext.grid.EditorGridPanel 可編輯的表格
grid Ext.grid.GridPanel 表格
paging Ext.PagingToolbar 工具欄中的間隔
panel Ext.Panel 面板
progress Ext.ProgressBar 進度條
splitbutton Ext.SplitButton 可分裂的按鈕
tabpanel Ext.TabPanel 選項面板
treepanel Ext.tree.TreePanel 樹
viewport Ext.ViewPort 視圖
window Ext.Window 窗口
工具欄組件有
---------------------------------------
toolbar Ext.Toolbar 工具欄
tbbutton Ext.Toolbar.Button 按鈕
tbfill Ext.Toolbar.Fill 文件
tbitem Ext.Toolbar.Item 工具條項目
tbseparator Ext.Toolbar.Separator 工具欄分隔符
tbspacer Ext.Toolbar.Spacer 工具欄空白
tbsplit Ext.Toolbar.SplitButton 工具欄分隔按鈕
tbtext Ext.Toolbar.TextItem 工具欄文本項
表單及字段組件包含:
---------------------------------------
form Ext.FormPanel Form面板
checkbox Ext.form.Checkbox checkbox錄入框
combo Ext.form.ComboBox combo選擇項
datefield Ext.form.DateField 日期選擇項
field Ext.form.Field 表單字段
fieldset Ext.form.FieldSet 表單字段組
hidden Ext.form.Hidden 表單隱藏域
htmleditor Ext.form.HtmlEditor html編輯器
numberfield Ext.form.NumberField 數字編輯器
radio Ext.form.Radio 單選按鈕
textarea Ext.form.TextArea 區域文本框
textfield Ext.form.TextField 表單文本框
timefield Ext.form.TimeField 時間錄入項
trigger Ext.form.TriggerField 觸發錄入項
可用的vtype列表:
alpha,alphanum,email,url