当我将配置设置为可滚动时,整个面板会滚动。但是,在可滚动面板的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,
}]
});
}
}
}
}]
}]
}
现在整个面板都在滚动。我想锁定最顶层的面板。