PDA

View Full Version : Viewport with a nested tab panel???



hugesuccess
8 Dec 2011, 11:48 AM
Hi All! I have a viewport with a tabpanel, and a settings page which I don't want to be part of the tab application. Currently I cannot dock the item to the bottom of the app. Can anybody look at this code and help me out? Thanks!



Floatie.views.Viewport = Ext.extend(Ext.Panel, {
fullscreen: true,
layout: 'card',
id: 'viewport',
fullscreen: true,
initComponent: function() {
Ext.apply(this, {

items: [
{
xtype: 'tabpanel',
tabbar: {
dock: 'bottom',
layout: {
pack: 'center'
}
},
items:[{
title: 'One',
},
{
title: 'Two'
},{
title: 'Three'
}],
dockedItems:[{
xtype: 'toolbar',
title: 'Welcome',
layout: {
pack: 'right',
},
items: [{
iconCls: 'delete', iconMask: true, ui: "plain",
handler: function() {
var test = Ext.getCmp('viewport');
test.setActiveItem(1,{type:'flip'});
}
}]
}]
},
{
xtype: 'panel',
html: 'this is panel two',
dockedItems:[{
xtype: 'toolbar',
title: 'Link Accounts',
layout: {
pack: 'right',
},
items: [{
iconCls: 'delete', iconMask: true, ui: "plain",
handler: function() {
var test = Ext.getCmp('viewport');
test.setActiveItem(0,{type:'flip'});
}
}]
}
]
}
],
});
Floatie.views.Viewport.superclass.initComponent.apply(this, arguments);
}
});

AndreaCammarata
9 Dec 2011, 8:12 AM
Hi,
sorry but I'm not sure I understand your question.
What are you trying to achieve?

Thank you