Ext.onReady(function() {
Ext.QuickTips.init();
............
var content_c_book_grid = new Ext.grid.EditorGridPanel({
region : "center",
cm : cm,
sm : sm,
store : store,
tbar : [{text : "新建",}]
});
store.load();
var content_c_book = new Ext.Panel({
title : "書籍管理",
closable : true,
layout : "border",
items : [ content_c_book_grid]
});
var content_c = new Ext.TabPanel({
margins : "5 5 5 5",
region : "center",
activeTab : 0,
items : content_c_book
});
// 以下Toolbar必須放在content_c_book_grid包括其父容器顯示出來(lái)以后.即容器與父容器最后一次調(diào)用后.
// 這其實(shí)也是一種添加組件的方法.
new Ext.Toolbar({
renderTo : content_c_book_grid.tbar, //添加多個(gè)工具欄的容器
items : [{
text : "查詢"
}]
})