PDA

View Full Version : Problem with ComboBox [3.1.1]



ehuertasf
27 Mar 2010, 10:58 AM
Hello,
I' trying to use the 'column' layout to organize Text an Combos but I'm havin a strange problem with Combos, they don´t show next to the label, just when I click a combo it fixes.

When the columnWidth is more than 40 it's ok, fields from my store are just 4 chars maximun

Using IE8 on WXP SP2

http://www.amediaobjectives.com/layout.JPG



var cbo_tipvia = new Ext.form.ComboBox({
id : 'cbo_tipvia',
name : 'codtipvia',
fieldLabel : 'Via',
mode : 'local',
allowBlank : false,
store : ds_vias,
displayField : 'destipvia',
valueField : 'codtipvia',
hiddenName : 'vcodtipvia',
anchor : '100%'
});

var myformPanel = new Ext.FormPanel({
url : somefile.php',
frame : false,
border : false,
fileUpload : true,
items : [{
layout : 'column',
border : false,
title : 'Dirección',
frame : true,
collapsible : true,
items : [{
columnWidth : .12,
layout : 'form',
labelWidth : 20,
items : cbo_tipvia
}]
}]
});


Thx.
Edward H.

j_mmontero
27 Mar 2010, 4:57 PM
Try increasing the column width.

I tried your code and looks ok for me in FF.


var cbo_tipvia = new Ext.form.ComboBox({
id : 'cbo_tipvia',
name : 'codtipvia',
fieldLabel : 'Via',
mode : 'local',
allowBlank : false,
store: new Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'item1'], [2, 'item2']]
}),
valueField: 'myId',
displayField: 'displayText',
anchor : '100%'
});

var myformPanel = new Ext.FormPanel({
url : 'somefile.php',
frame : false,
border : false,
fileUpload : true,
items : [{
layout : 'column',
border : false,
title : 'Dirección',
frame : true,
collapsible : true,
items : [{
columnWidth : .12,
layout : 'form',
labelWidth : 20,
items : cbo_tipvia
}]
}]
});
myformPanel.render(Ext.getBody())