View Full Version : TabPanel

8 Jul 2012, 11:56 PM
I have a tabpanel in the center region of a border layout. I would like to control a single iframe and change the location.href of the iframe based upon the click event of each tab. For instance...tab 1 would go to google.com tab 2 would go to cnn.com etc. I can do this by using multiple iframes that are the content for each tab...but I want a single iframe. How would this be done?

9 Jul 2012, 12:20 AM
You can add tabbar to panel

Ext.create('Ext.panel.Panel', {
width: 400,
height: 200,
renderTo: document.body,
html: 'test',
dockedItems: [{
xtype: 'tabbar',
dock: 'top',
items: [
{text: 'tab1'},
{text: 'tab2'}
listeners: {
change: function (tabs, tab, card) {
var panel = tabs.up('panel');