PDA

View Full Version : Textfield in form panel never goes left



YomeKitsuma
27 Feb 2012, 7:46 AM
Hi,

I'am doing thing simple as possible, but my textfield in my form panel is never left aligned !


Ext.define('Foe.view.stock.Info', { extend : 'Ext.panel.Panel',

title : 'Informations du stock.',
cls : 'stock-info',
width : 640,


bodyPadding: 10,


fieldDefaults: {
labelAlign: 'left',
labelWidth: 240,
anchor: '100%'
},
items : [
{
xtype: 'textfield',
name: 'namefield',
fieldLabel: 'Nom',
value: 'stock name'
},
{
xtype: 'displayfield',
name: 'descfield',
fieldLabel: 'Description',
value: 'stock description'
}
]
});

result is the fieldLabel stays on top of the input field !

/:)

nb : same for the 'right' labelAlign setting !

friend
27 Feb 2012, 9:22 AM
Your code sample works as expected for me (FireFox 10), minus the cls: 'stock-info' bit of config.

You may have a CSS problem or it's a parent container/layout issue.

YomeKitsuma
27 Feb 2012, 10:54 PM
It should probably due to the parent container.

Thank for responding.