caerolus
18 Aug 2008, 5:04 AM
Hi all,
I just upgraded from 2.1 to 2.2. Everything fine, but I've got a problem with a checkbox. Here's the code (probably need to change ext's paths):
<html>
<head>
<link type="text/css" rel="stylesheet" href="/extjs/resources/css/ext-all.css">
<script type="text/javascript" src="/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/extjs/ext-all.js"></script>
<script type="text/javascript" language="JavaScript">
var form = new Ext.form.FormPanel({
width: 315,
labelAlign : 'right',
frame : true,
autoHeight : true,
defaultType : 'textfield',
border: false,
defaults : {
allowBlank : false,
width : 150, // I set this to have all fields set to this size
validationDelay : 800,
validateOnBlur : false
},
labelWidth : 100, // and also have this label's size
items : [{
fieldLabel : 'Username',
}, {
fieldLabel : 'Password',
inputType : 'password',
}, {
xtype: 'checkbox',
labelSeparator : '',
//width: 250, // Here the problem
boxLabel : 'Remember me',
checked : true
}],
buttons : [{
text : 'Submit'
}, {
text : 'Cancel'
}]
});
form.render(Ext.getBody());
</script>
</head>
<body>
</body>
</html>
The problem is that the boxLabel is shown split in several lines:
8823
Unless I set the checkbox width to something like 220, it does not do it right. All was ok in 2.1
My guess is that the default 'width: 150' also considers the label in the case of a checkbox. I don't know.
This is on Win XP Pro with Firefox 3.0.1.
Thanks!
I just upgraded from 2.1 to 2.2. Everything fine, but I've got a problem with a checkbox. Here's the code (probably need to change ext's paths):
<html>
<head>
<link type="text/css" rel="stylesheet" href="/extjs/resources/css/ext-all.css">
<script type="text/javascript" src="/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/extjs/ext-all.js"></script>
<script type="text/javascript" language="JavaScript">
var form = new Ext.form.FormPanel({
width: 315,
labelAlign : 'right',
frame : true,
autoHeight : true,
defaultType : 'textfield',
border: false,
defaults : {
allowBlank : false,
width : 150, // I set this to have all fields set to this size
validationDelay : 800,
validateOnBlur : false
},
labelWidth : 100, // and also have this label's size
items : [{
fieldLabel : 'Username',
}, {
fieldLabel : 'Password',
inputType : 'password',
}, {
xtype: 'checkbox',
labelSeparator : '',
//width: 250, // Here the problem
boxLabel : 'Remember me',
checked : true
}],
buttons : [{
text : 'Submit'
}, {
text : 'Cancel'
}]
});
form.render(Ext.getBody());
</script>
</head>
<body>
</body>
</html>
The problem is that the boxLabel is shown split in several lines:
8823
Unless I set the checkbox width to something like 220, it does not do it right. All was ok in 2.1
My guess is that the default 'width: 150' also considers the label in the case of a checkbox. I don't know.
This is on Win XP Pro with Firefox 3.0.1.
Thanks!