PDA

View Full Version : Combobox label positon on update 4.0.7 to 4.1



Romick
11 May 2012, 4:55 AM
Hi
I have the following code.


Ext.create('Ext.Window', {
width: 350,
height: 150,
modal: true,
layout: {
type: 'vbox',
align: 'center',
pack: 'center'
},
items: [{
fieldLabel: 'ComboTitle',
labelWidth: 100,
width: 200,
height: 20,
xtype: 'combobox',
store: new Ext.data.SimpleStore({
fields:['abbr', 'dates'],
data:[
['DAY3AMEST', '3am Est. Time'],
['DAY9AMEST', '9am Est. Time'],
['DAY3PMEST', '3pm Est. Time']
]
}),
valueField: 'abbr',
displayField: 'date',
flex: 1
}]
}).show();

In 4.0.7 Combobox text label middle align. But in 4.1 it has top align. How to fix it?

redraid
11 May 2012, 5:29 AM
To fix this put field in container:


Ext.create('Ext.Window', {
width: 350,
height: 150,
modal: true,
layout: {
type: 'vbox',
align: 'center',
pack: 'center'
},
items: {
xtype: 'container',
items: {
fieldLabel: 'ComboTitle',
labelWidth: 100,
width: 200,
height: 20,
xtype: 'combobox',
store: new Ext.data.SimpleStore({
fields:['abbr', 'dates'],
data:[
['DAY3AMEST', '3am Est. Time'],
['DAY9AMEST', '9am Est. Time'],
['DAY3PMEST', '3pm Est. Time']
]
}),
valueField: 'abbr',
displayField: 'date',
flex: 1
}
}
}).show();

ps. error in -
displayField: 'date', ;)

Romick
11 May 2012, 5:46 AM
Ok great. Nice trick. But shoud EXTJS team fix it?

PS date yes i know it it just test case. Never mind.
Thanks
.