日期:2014-05-16 浏览次数:20400 次
tbar : [{
   id : 'newWindow',
   text : '票据入库',
   iconCls : 'add',
   handler : function() {
   showMemerAddWindow(); //显示表单所在窗体
   }
}]
tbar2 = new Ext.Toolbar({
   renderTo : grid.tbar,//其中grid是上边创建的grid容器
    items : ['第二行工具栏', '-', {
    text : '查询',
    iconCls : 'search'
   }, '-']
});
Ext.onReady(function(){ 
   var tbar1 = new Ext.Toolbar([ 
   {text:'添加按钮'},{text:'修改按钮'},{text:'删除按钮'}]); 
    var main = new Ext.Panel({ 
        title:'一个面板', 
        border:false, 
        tbar : [{text:'一个按钮'}], 
        listeners : { 
        'render': function(){ 
            tbar1.render(main.tbar); 
         } 
       } 
     }); 
     main.render(document.body); 
});