0
我創造這樣一個窗口網格:ExtJS的4個GridPanel中在窗口惱人的水平滾動條
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email',],
data:{'items':[
{ 'name': 'Lisa', "email":"[email protected]" },
{ 'name': 'Bart', "email":"[email protected]" },
{ 'name': 'Homer', "email":"[email protected]" },
{ 'name': 'Marge', "email":"[email protected]" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create("Ext.window.Window", {
title: 'BlaBla',
closable: true,
modal: true,
width: 800,
height: 460,
layout: 'fit',
items: [
{
xtype: 'gridpanel',
autoScroll: true,
store: Ext.data.StoreManager.lookup('simpsonsStore'),
title: 'Choose which features you would like to use to create parts.',
// height: 300,
columns: {
items: [
{
header: 'Name',
tooltip: 'Name',
dataIndex: 'name',
flex: 1
},
{
header: 'Email',
tooltip: 'Email',
dataIndex: 'email',
flex: 1
}
]
}
},
]
}).show();
然而,GridPanel中有一個惱人水平滾動條,因爲列是合適的,所以不需要。
爲什麼該滾動條被創建,應該使用什麼?
我沒有看到任何滾動條,當我在小提琴中運行你的代碼。 @UDID:即使沒有改變任何寬度,它看起來不錯。 – Srikanth
@Srikanth可能是,但是當我創建小提琴時,它顯示滾動條,所以我認爲這是因爲窗寬。如果窗口小於實際網格,那麼這通常發生。 – UDID