PDA

View Full Version : [4.1.1] Ext.layout.container.Column doesn't work properly



Ex_Soft
25 Jul 2012, 3:37 AM
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Test Layout (Form IV)</title>
<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css"/>
<script charset="utf-8" src="http://cdn.sencha.io/ext-4.1.1-gpl/ext-all-debug.js"></script>
<!-- <link rel="stylesheet" href="http://cdn.sencha.io/ext-4.0.7-gpl/resources/css/ext-all.css"/>
<script charset="utf-8" src="http://cdn.sencha.io/ext-4.0.7-gpl/ext-all-debug.js"></script> -->
<script>
Ext.onReady(function() {
var
p = Ext.create("Ext.form.Panel", {
title: "Panel",
border: 0,
items: [{
layout: "column",
border: 0,
defaults: {
layout: "anchor",
border: 0,
padding: "5 10"
},
items: [{
columnWidth: 0.35,
defaults: {
anchor: "100%",
labelAlign: "right"
},
items: [{
xtype: "textfield",
fieldLabel: "core",
value: Ext.versions.core.version
}]
}, {
columnWidth: 0.65,
defaults: {
anchor: "100%",
labelAlign: "right"
},
items: [{
xtype: "textfield",
fieldLabel: "extjs",
value: Ext.versions.extjs.version
}]
}]
}]
});

Ext.create("Ext.window.Window", {
autoShow: true,
items: [p]
});
});
</script>
</head>
<body>
</body>
</html>

4.0.7 works fine
4.1.1 doesn't work. When I add


Ext.create("Ext.window.Window", {
autoShow: true,
width: 600,
items: [p]
});

4.1.1 works (http://jsfiddle.net/4vCwg/). But the width of the form isn't resized if the width of window is changed. The width of form is resized only after the height of the window will be changed.

How to use Ext.layout.container.Column without setting the width of window?

friend
25 Jul 2012, 6:09 AM
Try setting layout: 'fit' on your Window component.

Ex_Soft
25 Jul 2012, 10:15 AM
Try setting layout: 'fit' on your Window component.
Doesn't works (http://jsfiddle.net/4vCwg/1/)