PDA

View Full Version : A question about tabpanel resize



zzw0598
19 Jan 2010, 3:40 AM
Hi,everyone, I have follow code:



Ext.onReady(function() {
var pa1 = new Ext.Panel({
height : 100,
title : 'pa1',
region : 'north',
items : [new Ext.Panel({
title : 'pa1in'
}), new Ext.Panel({
title : 'pa1in1'
})]
});
var pa2 = new Ext.Panel({
title : 'pa2',
region : 'center',
items : [new Ext.Panel({
title : 'pa2in'
}), new Ext.Panel({
title : 'pa2in1'
})]
});
var pa = new Ext.Panel({
title : 'pa',
layout : 'border',
items : [pa1, pa2]
});
var pb1 = new Ext.Panel({
title : 'pb1',
region : 'north'
});
var pb2 = new Ext.Panel({
title : 'pb2',
region : 'center'
});
var pb = new Ext.Panel({
title : 'pb',
layout : 'border',
items : [pb1, pb2]
});
var tab = new Ext.TabPanel({
activeTab : 0,
items : [pa, pb]
});
var v = new Ext.Viewport({
layout : 'fit',
items : [tab]
});
});


the question is :
when I open a url with the code in it, I activate the Panel pa, now it renders normally as I wanted. then I activate the Panel pb,and resize the window , now if I activate Panel pa again, the pa1in and pa1in1 lost

why do this?

anyone help me ,thanks

zzw0598
19 Jan 2010, 4:18 AM
I used Ext 3.1.0

zzw0598
19 Jan 2010, 4:55 PM
anybody help me?

zzw0598
20 Jan 2010, 1:52 AM
up again

Condor
20 Jan 2010, 1:59 AM
This should work better in Ext 3.1.1-beta, but in Ext 3.1.0 you can add defaults:{hideMode:'offsets'} to the tabpanel config to fix the problem.

zzw0598
21 Jan 2010, 1:08 AM
It works!

thank's very much?