PDA

View Full Version : How to set fieldLabel's width (column layout in form)



Ex_Soft
15 Sep 2010, 6:14 AM
Column Layout in Form (http://examples.extjs.eu/formcol.html)
How to set fieldLabel's width?


...
labelStyle: "width: 20px;",
...
it changes fieldLabel's width, but input field doesn't change.

darthwes
15 Sep 2010, 6:39 AM
They are seperate



{
xtype: 'form',
labelWidth: 200,
anchor: '100%',
items: [{
xtype: 'textfield',
anchor: '100%',
fieldLabel: 'Label',
name: 'tf1'
}]
}


Meaning that the width of the textfield (anchor: 100%) MINUS the length of the fieldLabel is the length of your input element.