EXTJS4: how can i set the fieldlabel Width of a xtype:'textfield'

user2477311 picture user2477311 · Jul 16, 2013 · Viewed 12.9k times · Source

I have a xytpe form, and i want so set the width of the fieldLabel and not the width of the label itself.

{
    xtype: 'textfield',
    id: 'iln',
    name: 'iln',
    fieldLabel: 'Product-Number-Field-with-body-height',
    allowBlank: true,
    anchor: '100%'
}

I tried everything...its only changes the textfield, and not the width of the fieldlabel. Any help? THANK YOU!

Answer

kevhender picture kevhender · Jul 16, 2013

Changing the labelWidth is changing the input field's width because you are using anchor: 100%. Take this out and labelWidth should do more like you are expecting.