PDA

View Full Version : How to identify the content resize in tabpanel?



Rajarajeswari MS
4 Nov 2008, 3:37 AM
Hi,

I am using Tabpanel and i want to set the dynamic height(means the panel should be flexible based on the content). My code as follows

var tab = new Ext.TabPanel({
id:tabId,
renderTo:tabId,
minTabWidth: 50,
tabWidth:165,
enableTabScroll:true,
width:width,
hidden:true,
listeners: {
tabchange : function(n) {
var getHeight = Ext.getCmp(tabId).getActiveTab().getInnerHeight();
if(getHeight <= 300){
Ext.getCmp(tabId).setHeight(320);
}
else{
Ext.getCmp(tabId).setHeight(getHeight+50);

}
}
},
defaults: {autoHeight:true}
});


The problem in the above code the height will be reset while the tabchange. But i want reset the height whenever the content height change(ie: getInnerHeight changes). I have used bodyresize and resize event but it is not working .

Can anyone help me out on this issue?

Regards,
Rajarajeswari MS