netemp
20 Jun 2012, 7:04 AM
If in a tabpanel, we provide a tbar and also keep tabposition as top, then the tbar gets displayed below the tabbar as shown in the attached screenshot.
How to correct this and get the tbar at top?
Following is a small test case representing such a behaviour:
Ext.onReady(function(){
new Ext.Viewport({
layout:"fit",
renderTo:Ext.getBody(),
items:[{
xtype: 'tabpanel',
id: 'mainTab',
activeTab: 0,
tabPosition:'top',
tbar: [{
text:"Documentation",
menu:[{
"text": "Vessel Documentation",
"id":"idVesselDocumentation",
menu:[{
text:"Application For Berthing",
id:"idApplicationForBerthing",
handler:function(){
Ext.getCmp('mainTab').add({
xtype:"panel",
title:"Application For Berthing",
items:[{
xtype:"textfield",
fieldLabel:"Hello"
}]
});
}
},{
text:"Berthing Monitoring"
},{
text:"VIA Generation"
},{
text:"ISPS Registration"
},{
text:"Voyage To Port Rotation"
}]
},{
"text": "Customer Documentation",
"id":"idCustomerDocumentation",
menu:[{
text:"Party Master"
},{
text:"Party Role Mapper"
},{
text:"Consortium Master"
},{
text:"Special Agreement"
}]
}]
},{
text:"Container"
},{
text: "Masters"
}],
items:[
{
title:'First Tab',
html:'Content of the First Tab'
},
{
title:'Second Tab',
html:'Content of the Second Tab'
},{
title:'Third Tab',
html:'Content of the Third Tab'
}
]
}]
});
});
36384
How to correct this and get the tbar at top?
Following is a small test case representing such a behaviour:
Ext.onReady(function(){
new Ext.Viewport({
layout:"fit",
renderTo:Ext.getBody(),
items:[{
xtype: 'tabpanel',
id: 'mainTab',
activeTab: 0,
tabPosition:'top',
tbar: [{
text:"Documentation",
menu:[{
"text": "Vessel Documentation",
"id":"idVesselDocumentation",
menu:[{
text:"Application For Berthing",
id:"idApplicationForBerthing",
handler:function(){
Ext.getCmp('mainTab').add({
xtype:"panel",
title:"Application For Berthing",
items:[{
xtype:"textfield",
fieldLabel:"Hello"
}]
});
}
},{
text:"Berthing Monitoring"
},{
text:"VIA Generation"
},{
text:"ISPS Registration"
},{
text:"Voyage To Port Rotation"
}]
},{
"text": "Customer Documentation",
"id":"idCustomerDocumentation",
menu:[{
text:"Party Master"
},{
text:"Party Role Mapper"
},{
text:"Consortium Master"
},{
text:"Special Agreement"
}]
}]
},{
text:"Container"
},{
text: "Masters"
}],
items:[
{
title:'First Tab',
html:'Content of the First Tab'
},
{
title:'Second Tab',
html:'Content of the Second Tab'
},{
title:'Third Tab',
html:'Content of the Third Tab'
}
]
}]
});
});
36384