PDA

View Full Version : Problem with 100% height in a borderlayout



kpitn
29 Nov 2007, 1:09 AM
Hi all, I have a little problem whit border layout.

This is my layout :


Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var panelhaut;
var viewport = new Ext.Viewport({
layout:'border',
items:[
new Ext.BoxComponent({ // raw
region:'north',
el: 'north',
height:30,
layout:'border',
}),{
region:'south',
contentEl: 'south',
split:true,
height: 100,
minSize: 100,
maxSize: 200,
collapsible: true,
title:'South',
margins:'0 0 0 0'
},panelhaut=new Ext.Panel({
region:'center',
title:'Description',
contentEl: 'center',
frame:true,
tbar: [
]
})
]
});


I had a toolbar in the center "panelhaut.getTopToolbar().add('->', {}"

And in the center i put a form :

var simple = new Ext.FormPanel({
id: 'contentForm',
name: 'contentForm',
url:'<?php echo $this->baseUrl ?>/description/<?php echo $this->action; ?>',
method: 'POST',
labelWidth: 0,
hideLabels: true,
onSubmit: Ext.emptyFn,
submit: function() {
this.getEl().dom.submit();
},
width: '100%',
items:
[{
xtype:'textarea',
name:'fck_description',
id:'fck_description',
height:'100%',
width:'100%',
value: '<?php
$description= $this->description;
$description=str_replace(array("\r\n", "\n", "\r" ), "", $description);
$description=addslashes($description);
echo $description;
?>'
},{
xtype:'textarea',
name:'temp',
id:'temp',
css:'visibility:hidden;',
}]
});


at the end i add :


simple.render(document.getElementById("center"));
viewport.doLayout();




My problem is that my textarea (height : 100%) + the toolbar are over the south panel,
But whe i resize the windows, everything is ok.

What can i do ?