PDA

View Full Version : CompositeField, fieldLabel and labelWidth



devnullable
13 Oct 2010, 1:19 AM
Hi,

I am trying to set labelWidth of CompositeField but it does not seem to work at all. I have tried to set fieldLabel for each field and tried to set fieldLabel for CompositeField but it's not changing the width of label from 100px. What could be wrong?


{
xtype: 'compositefield',
labelWidth: 130,
items: [
{
xtype: 'textfield',
id: 'field1',
fieldLabel: 'Field 1',
msgTarget: 'side',
width: 90
},
{
xtype: 'textfield',
id: 'field6',
fieldLabel: 'Field 6',
msgTarget: 'side',
width: 90
}
]

}

Condor
13 Oct 2010, 1:32 AM
labelWidth is a config option of the container with layout:'form' and not of the form items themselves.

devnullable
13 Oct 2010, 1:41 AM
labelWidth is a config option of the container with layout:'form' and not of the form items themselves.
I see. Then very first example in documentation (http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.CompositeField) is clearly wrong?

Condor
13 Oct 2010, 1:49 AM
Correct, that would never work (and it's missing a comma too!).

Care to post this doc error in the Bugs section?

devnullable
13 Oct 2010, 2:02 AM
Correct, that would never work (and it's missing a comma too!).

Care to post this doc error in the Bugs section?
Thanks. I'll post there.