PDA

View Full Version : [4.0.2] If for panel set layout "table" and height - form fields layouting very bad



fguest
12 Jun 2011, 4:02 AM
screenshot:

26555

testcase:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>bug</title>
<link rel="stylesheet" type="text/css"
href="http://dev.sencha.com/deploy/ext-4.0.2/resources/css/ext-all.css"/>
<script type="text/javascript"
src="http://dev.sencha.com/deploy/ext-4.0.2/ext-all-debug.js"></script>
</head>

<body>
<script type="text/javascript">
Ext.onReady(function() {
var p = Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
height: 200, // COMMENT THIS AND NO BUG :(
layout: {type:'table'},
items:[
Ext.create('Ext.panel.Panel', {
layout: {type:'table',columns:2},
items:[
{xtype:'label',text:'Field2:'},
{xtype:'datefield', value: new Date(), hideLabel:true},
{xtype:'label',text:'Field1:'},
{xtype:'textfield', hideLabel:true, value:'123'},
]
})
]
});
});

</script>
</body>
</html>

tuxz0r
13 Jun 2011, 5:59 AM
Bump.

We're experiencing the same problem. I have a Panel, which contains a Form Panel, and the height of each of the form fields is being explicitly set to 0 (e.g. style="height: 0") in the elements - when using the table layout for the form. This is causing the fields to collapse to thin little strips, exactly like the layout shows for the previous poster.

We're also experiencing a similar effect for collapsible panels in a vbox layout. If the panel starts out exapanded, and is then collapsed, you can no longer expand it again. If it starts out collapsed, it shrinks to 0 width.

Any insights or workarounds would be helpful at this point. I can explicitly set the height on the form fields to 22px via CSS and this seems to solve the first problem; but I have no working solution for the second issue with collapsible panels yet.

medusadelft
13 Jun 2011, 11:12 AM
I have a similar problem too. It happend in 4.0.2 RC 3, but it wasn't fixed in the final release unfortunately.
It's not on every panel/form I have, so not sure what triggers it as all my forms are basically the same (same settings/options).