PDA

View Full Version : [Solved] column layout nest a accordion layout, different display between IE and FF



zliu
21 Jul 2010, 7:17 AM
I just wonder how to make it works when the panel changes size and the numbers of buttons inside column layout panel will adjust by its width and panel width. It seem it works for FF but not IE6. When I use IE6, when the panel's width increase, the number of buttons on the one row will increase; but when width turns small, the number of buttons wont change.

MyViewportUi = Ext.extend(Ext.Viewport, {
layout: 'border',
initComponent: function() {
this.items = [
{
xtype: 'panel',
title: 'accordionPanel',
region: 'west',
layout: 'accordion',
split: true,
width: 281,
items: [
{
xtype: 'panel',
title: 'columnPanel',
layout: 'column',
items: [
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
},
{
xtype: 'button',
text: 'MyButton'
}
]
}
]
},
{
xtype: 'panel',
title: 'CenterPanel',
region: 'center'
}
];
MyViewportUi.superclass.initComponent.call(this);
}
});
The code works well for FF, but not for IE;
I just start to learn Ext, anyone can give me some suggestion?

Animal
21 Jul 2010, 7:33 AM
layout: {
type: 'accordion',
autoWidth: false
}

zliu
21 Jul 2010, 4:01 PM
Thanks, it works now!

zliu
21 Jul 2010, 6:38 PM
When I added more panels which using column layout inside the accordion panel, it seems new problem comes no matter what browser I used.

I think since I add "autoWidth : false" to accordion panel,when inside panel is resized others do not auto-fix their width. After some times expanded and resized nested panels, it seems like that
21568;

Anyone can give some suggestions?

Animal
21 Jul 2010, 11:09 PM
What Ext version?

Condor
21 Jul 2010, 11:33 PM
Accordion doesn't handle autoWidth:false correctly.

You need this patch (http://www.sencha.com/forum/showthread.php?31069-UNKNOWN-2.x-3.x-BUG-GridPanel-inside-accordion-layout-forceFit-problem-IE6&p=396044#post396044).

zliu
22 Jul 2010, 6:47 AM
What Ext version?
3.2

zliu
22 Jul 2010, 6:48 AM
Accordion doesn't handle autoWidth:false correctly.

You need this patch (http://www.sencha.com/forum/showthread.php?31069-UNKNOWN-2.x-3.x-BUG-GridPanel-inside-accordion-layout-forceFit-problem-IE6&p=396044#post396044).

Thx Condor, I will try it tomorrow morning~

zliu
22 Jul 2010, 11:18 PM
Thx Condor, I used your patch and it works both browsers right now.
I hope Extjs can fix this accordion layout problem!