PDA

View Full Version : north region in borderlayout has no height initially



Jonnsn
25 Apr 2010, 6:42 AM
Hi all,

I have a "main" borderlayout - and in the east-Region of it I have another nested borderlayout, a sidebar. In this sidebar I defined a north and a center region.
Each of these regions may contain some panels later. I would like these regions to be splitted, so that the user can change their height. This resizing works fine - but the north region initially has no height. If I pull the splitbar, it appears correctly.

region:'east',
id:'sidebar',
width: 200,
collapseMode: 'mini',
split: true,
minSize: 200,
maxSize: 200,
animCollapse: false,
collapsible: true,
layout: 'border',
items: [{
region: 'north',
border: false,
split: true,
layout: 'fit',
items: [{
html: '<p>Lorem Ipsum Dolor sit Amet...</p>',
collapsible: true,
bodyStyle: 'padding:2px',
title: 'Box1',
layout: 'fit',
animCollapse: false,
}]
},{
region: 'center',
border: false,
split: true,
layout: 'fit',
items: [{
html: '<p>Lorem Ipsum Dolor sit Amet...</p>',
collapsible: true,
bodyStyle: 'padding:2px',
title: 'Box2',
layout: 'fit',
animCollapse: false,
}]
}]I tried height: 'auto' but no change... If i use a fix height it works - but if possible I would like to avoid that - the height should be according to the content.

Also I would like the north region to be resized, if a Panel inside of it is collapsed/expanded. Is this Possible?

Thank you for any hints and proposals!

Regards

evant
25 Apr 2010, 7:30 AM
From the docs:



# Any container using the BorderLayout must have a child item with region:'center'. The child item in the center region will always be resized to fill the remaining space not used by the other regions in the layout.
# Any child items with a region of west or east must have width defined (an integer representing the number of pixels that the region should take up).
# Any child items with a region of north or south must have height defined.

Jonnsn
25 Apr 2010, 12:46 PM
Ok - thank you for pointing this out. Must have missed that...
so I have to look for an other way to realize my targets.

Regards