Werzi2001
6 Nov 2012, 7:42 AM
Hi,
i have a project where i need a border layout which has a fixed width center layout and a flexible width east layout. The obvious solution setting a width on the center region and none on the east region seems not to work:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="./extjs/resources/css/ext-all-gray.css"/>
<script type="text/javascript" src="./extjs/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
var centerpanel = Ext.create('Ext.panel.Panel', {
region: 'center',
title: 'center',
width: 400
});
var eastpanel = Ext.create('Ext.panel.Panel', {
region: 'east',
title: 'east',
split: true,
collapsible: true
});
var viewport = Ext.create('Ext.container.Viewport', {
id: 'cont-viewport',
layout: 'border',
items: [centerpanel, eastpanel]
});
});
</script>
</body>
</html>
I cannot simply change the center region to be the west region and the east region to be the center region because i want to collapse the right panel to the right which seems only be possible if it also is the east region.
How can this be done? Thanks for your help.
Yours
Werzi2001
i have a project where i need a border layout which has a fixed width center layout and a flexible width east layout. The obvious solution setting a width on the center region and none on the east region seems not to work:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="./extjs/resources/css/ext-all-gray.css"/>
<script type="text/javascript" src="./extjs/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
var centerpanel = Ext.create('Ext.panel.Panel', {
region: 'center',
title: 'center',
width: 400
});
var eastpanel = Ext.create('Ext.panel.Panel', {
region: 'east',
title: 'east',
split: true,
collapsible: true
});
var viewport = Ext.create('Ext.container.Viewport', {
id: 'cont-viewport',
layout: 'border',
items: [centerpanel, eastpanel]
});
});
</script>
</body>
</html>
I cannot simply change the center region to be the west region and the east region to be the center region because i want to collapse the right panel to the right which seems only be possible if it also is the east region.
How can this be done? Thanks for your help.
Yours
Werzi2001