/**
* 获取下拉列表框定义
*/
getBoxTextEditor: function (box_text_store) {
//定义了下拉列表框
var editor = new Ext.form.ComboBox({
editable: false,
displayField: "text",
valueField: "id",
editable: true,
typeAhead: true,
mode: "local",
store: new Ext.data.ArrayStore({
fields: ["id", "text"],
data: box_text_store
}),
listeners: {
'focus': {
fn: function (e) {
//把下拉框展开后的列表部分设为宽度自适应
//自动展开,
e.expand();
this.doQuery(this.allQuery, true);
//把下拉框展开后的列表部分设为宽度自适应
var t_list_id = e.picker.el.el.id;
$('#' + t_list_id).css('width', 'auto');
$('#' + t_list_id).css('minWidth', '120px');
},
buffer: 100
}
}
});
return editor;
}
>>>