PDA

View Full Version : nested layouts



bauchinj
8 Nov 2009, 11:43 PM
good morning!

I'd like to add a border layout in east region of another border layout:

here what I like to add:


eastCntainer.add({
xtype : 'container',
layout : "border",
hidden : false,
region : 'east',
anchor : '100% 100%',
id : 'p2',
items : [{
region : "center",
title : "main",
html : "main panel contents",
layout : "fit"
}, {
region : "east",
title : "east",
html : "east panel contents",
width : 300,
layout : "fit"
}]
});

The container is added, but it's not a border layout:

east region is in front of center region, so I can't see the output 'main panel contents'...

Do anyone have a suggestion?

bauchinj
9 Nov 2009, 12:43 AM
Another problem:

when I add a region, for instance west region have a width of 0px, then I add a new panel with 200px (=west region width), I have to give center region a new width and a position. Is it possible to get this automatically, so that always border layout looks like!

complicated...

bauchinj
9 Nov 2009, 1:24 AM
First Thread is solved, I had to add the height of container.

But for my second question, I hope I get an answer!

Animal
9 Nov 2009, 2:35 AM
Why "add" to the east container?

Why not just configure the east region with layout: 'border' and put two regions in it???

bauchinj
9 Nov 2009, 2:46 AM
Because, first another east container contains a formular (layout: 'fit')

Animal
9 Nov 2009, 2:50 AM
You might consider "card" then.