PDA

View Full Version : Panel (border layout) autoHeight?



eztam
25 Jun 2010, 1:21 AM
Hi,

I want to create a Panel with autoHeight:true using border layout for it's content. Because I want to split the panel content into two regions (center, east) and want the eastern Panel to be collapsible.

I simply tried it this way:


var panel = new Ext.Panel({
renderTo: "panel_container",
autoHeight: true,
layout: "border",
items: [
{"region":"center","autoHeight":true,"items":...},
{"region":"east","width":200,"autoHeight":true,"items":...}
]
});
Isn't it possible to use a border layout with autoHeight?
I could also use a column or hbox layout, but then the eastern area couldn't be collapsible/resizable.
Furthermore can somone explain the difference between column and hbox layout?


Thanks, eztam!

Animal
25 Jun 2010, 1:26 AM
Border layout actively sizes the east, west and center heights depending on its own height.

Column layout is deprecated. It just did less than hbox.

eztam
25 Jun 2010, 3:25 AM
Border layout actively sizes the east, west and center heights depending on its own height.
This means, that the component having the border layout needs to have a defined height?

Animal
25 Jun 2010, 3:46 AM
yes

Condor
25 Jun 2010, 7:46 AM
Correct, but that doesn't mean it needs to have a 'height' and a 'width'.

It can also be given a fixed width and height by the layout of it's container or by using the FitToParent plugin.