PDA

View Full Version : different size labels for textfields



stevek
3 May 2010, 4:39 PM
hi guys,
how do you create different size labels for textfields in a form panel?
see the screenshot (in my attachment).
i want to modify the width of the height and weight labels to be different from the other labels.
i tried using the labelStyle config option by making the width:50px (see below) but it's not doing it right.
any help would be appreciated.



{
columnWidth: 0.27,
defaults: {
cls: 'x-form-text-field',
focusClass: 'x-form-focus-text-field',
labelStyle: 'border:1px solid black; width:50px;',
width: 50,
xtype: 'textfield'
},
items: [
{
fieldLabel: 'Height',
name: 'height'
},
{
fieldLabel: 'Weight',
name: 'weight'
}
],
layout: 'form'
}

Condor
3 May 2010, 10:59 PM
labelWidth: 50
(config option of the layout:'form' container)

stevek
4 May 2010, 3:36 PM
hi Condor,

That worked! Thanks. :-)