当我将配置设置为可滚动时,整个面板都会滚动。但是,items
在可滚动面板中,我想锁定一个panel
和scroll
其余部分。
怎么做到呢?
config: {
scrollable: true,
items: [{
xtype: 'panel',
layout: {
//type: 'vbox',
//align: 'start',
pack: 'fit'
},
items: [{
//want to lock this panel
xtype: 'panel',
id: 'name',
flex: 3,
scrollable: false,
html: '<b>Hello</b><br/>' +
'My name is rohan'
}, {
xtype: 'panel',
scrollable: true,
layout: 'fit',
flex: 5,
listeners: {
initialize: function(thisObj, eOpts) {
var parentObj = Ext.getCmp('id')
var service = parentObj.config.record.get('service')
var serviceArr = services.length;
for (i = 0; i < serviceArr; i++) {
thisObj.insert(i, {
xtype: 'panel',
cls: 'service',
layout: 'fit',
items: [{
html: '<br/>' + servicesOffered[i].service,
cls: 'serviceTitle',
}, {
xtype: 'list',
cls: 'namelist',
scrollable: 'false',
itemTpl: '{name} <span> {tel} - {mobile}</span>',
data: servicesOffered[i].namedetails,
height: 332,
}]
});
}
}
}
}]
}]
}
现在整个面板正在滚动。我想锁定最上面的面板。