varToolbarcartype =NewExt.toolbar ({//width:500,//Autowidth:true,Pressedfalse, Togglegroup:'Buttoolbar', allowdepress:false }); Toolbarcartype.add ({text:'Automobile Trademark', Icon:'/image/icon_padlock.png', ID:"Btntrademarkcar", Handler:function () {card.getlayout (). Setactiveitem (0); }}, {text:'Automotive origin or sub-brand', Icon:'/image/icon_padlock.png', ID:'btntrademarkcarlocation', Handler:function () {card.getlayout (). Setactiveitem (1); }}, {text:'Car car System', Icon:'/image/icon_padlock.png', ID:'Btnseriescar', Handler:function () {card.getlayout (). Setactiveitem (2); }}, {text:'Car Model', Icon:'/image/icon_padlock.png', ID:'Btnmodelnumbercar', Handler:function () {card.getlayout (). Setactiveitem (3); } }, " -",'Car Series:', {xtype:"TextField"Id:"Txtmodelnumber", Name:"Txtmodelnumber"}, {text:'Automotive Product Unit PKU', Icon:'/image/icon_padlock.png', ID:'Btnpku', Handler:function () {card.getlayout (). Setactiveitem (4); } } ); varToolbarwork =NewExt.toolbar ({items: [{text:'To perform the operation:', Width: -}, {text:'BMW', Icon:'/image/icon_padlock.png'Id:'Btn_tw_trademarkcar', Width: -, Handler:function () {card.getlayout (). Setactiveitem (0); }}, {text:'Origin', Icon:'/image/icon_padlock.png'Id:'btn_tw_trademarkcarlocation', Width: -, Handler:function () {card.getlayout (). Setactiveitem (1); }}, {text:'Car System', Icon:'/image/icon_padlock.png'Id:'Btn_tw_seriescar', Width: -, Handler:function () {card.getlayout (). Setactiveitem (2); }}, {text:'Model', Icon:'/image/icon_padlock.png'Id:'Btn_tw_modelnumbercar', Width: -, Handler:function () {card.getlayout (). Setactiveitem (3); } } ] });
Code inserted in the panel:
Tbar:toolbarcartype, listeners: { 'render'// Toolbarwork.render (Card.tbar); } },
ExtJS 3.0 Data Control Toolbar two lines of usage