有什麼辦法可以將ExtJS(版本4)組合框的下拉菜單的寬度設置得比實際輸入框的寬度寬嗎?ExtJS組合框下拉寬度比輸入框寬度寬嗎?
我有一個comboxbox,我想要200px左右,但我有分頁結果下拉,該寬度甚至不足以顯示所有分頁欄的控件。
這裏是我的代碼來創建組合:
var add_combo = Ext.create('Ext.form.field.ComboBox',
{
id : 'gbl_add_combo',
store : Ext.create('Ext.data.Store',
{
remoteFilter : true,
fields : ['gb_id', 'title'],
proxy :
{
type : 'ajax',
url : 'index.php/store/get_items',
reader :
{
type : 'json',
root : 'records',
totalProperty : 'total',
successProperty : 'success'
},
actionMethods :
{
read : 'POST',
create : 'POST',
update : 'POST',
destroy : 'POST'
}
}
}),
listConfig:
{
loadingText: 'Searching...',
emptyText: 'No results found'
},
queryMode : 'remote',
hideLabel : true,
displayField : 'title',
valueField : 'gb_id',
typeAhead : true,
hideTrigger : true,
emptyText : 'Start typing...',
selectOnFocus : true,
width : 225,
minChars : 3,
cls : 'header_combo',
pageSize : 15
});
顯示您的代碼段 – Ibu 2011-05-30 19:27:15
加入我的代碼的問題 – 2011-05-30 21:05:42