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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -