View Full Version : Child Panel Fit layout within center panel

Keith Chadwick
22 Dec 2009, 7:53 AM
I think perhaps I am going about an implementation incorrectly. I have a basic layout with a west, north, souch and center panels. The center panel has 3 primary panels. Each panel is to take up 100% of the width and height of the center panel and of course only one is visible at any one time. My problem is that these items within the center region never seem to listen to the layout type of 'fit'.

Is it possible to do what I have described OR is it more correct to simply change the center panel config on the fly then destroy and then add the necessary child items required then doLayout().

Keith Chadwick

22 Dec 2009, 8:25 AM

Are you using the card layout in the center panel?

Can you post your code?

Keith Chadwick
22 Dec 2009, 8:32 AM
Aha so thats the trick is it.. thanks so much Jay will have a look at that.

22 Dec 2009, 8:42 AM
The center region should be

region: 'center',
xtype: 'container',
layout: {
type: 'card'
items: [ p1, p2, p3 ]

(Possibly with an activeItem specified in the layout config object)

Keith Chadwick
22 Dec 2009, 11:22 AM
Thanks Animal, Jay that did is exactly what I wanted. Amazes me how comprehensive ExtJS is, it really does cover any style of implementation.

Merry Christmas and a Happy New Year to both of you.


22 Dec 2009, 11:51 AM
Glad we could help. Merry christmahannuquanza to you too :)