extjs - Creating a toolbar for a panel with tabs -
i have working code here:
var panel = ext.create('ext.tab.panel', { width: 500, height: 300, activetab: 1, //sets active tab (2nd) title: 'specific data', floating: true, // make panel absolutely-positioned floating component items: [{ title: 'tab 1', html: 'data data data' }, { title: 'tab 2', html: 'different data' }] });
i'm trying add toolbar (or buttons, not sure should use) add simple 'close window' command. help?
here's example of adding close button panel header. can use tools
config property. ext docs this explain many options.
there's fiddle saved here: http://jsfiddle.net/cfarmerga/jvmug/1/
var panel = ext.create('ext.tab.panel', { renderto: ext.getbody(), width: 500, height: 300, activetab: 1, //sets active tab (2nd) title: 'specific data', floating: true, // make panel absolutely-positioned floating component items: [{ title: 'tab 1', html: 'data data data', // enable closing of tab closable: true }, { title: 'tab 2', html: 'different data' }], tools: [ { type: 'close', handler: function () { this.up('panel').close() } } ] });
Comments
Post a Comment