PDA

View Full Version : Giving Ext.Panel 100% height?



PCSpectra
19 Nov 2009, 10:09 PM
I recall reading somewhere in the docs you needed to assign a height to the container DIV, which I have done, but when I do assign '100%' nothing works, regardless of browser. Yet the examples all render to 100% height, what am I missing?

Here is the config I am using:




var myBorderPanel = new Ext.Panel({
renderTo: 'container',
width: '100%',
height: '100%', // NOTE: This doesn't work?????
//title: 'Border Layout',


layout: 'border',
defaults: {
collapsible: true,
split: true,
bodyStyle: 'padding:15px'
},
items: [{
title: 'Tasks',
region: 'south',
height: 150,
minSize: 75,
maxSize: 250,
cmargins: '5 0 0 0'
},{
title: 'Site Pages/Structure',
region:'west',
margins: '5 0 0 0',
cmargins: '5 5 0 0',
width: '30%',
minSize: 100
//maxSize: 250
},{
title: 'Content',
collapsible: false,
region:'center',
margins: '5 0 0 0'
}]

mankz
19 Nov 2009, 11:27 PM
try autoHeight : true..?

PCSpectra
20 Nov 2009, 12:03 AM
Tried it, negative...didn't work... :( Any other ideas?

EDIT | Sounds as thouogh maybe I'm missing a ViewPort in which the layout should be embeded inside? I"ll continue to experiment and pillaging the demo source codes :P

CrazyEnigma
20 Nov 2009, 8:26 AM
Aren't you just using ViewPort?

PCSpectra
20 Nov 2009, 12:07 PM
I wasn't no...I copied the code from an example and it was using Panel not viewport...I have since switched and all is working as expected. :)

Cheers,
Alex