我需要将水平滚动设置为ExtJS任务栏,其中包含在一行中的按钮,这些按钮在结束时不可见。以下是代码。
Ext.define('myProject.view.accounts.user.UserGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.usergrid',
minHeight: 400,
margin: '0,5,0,5',
title: 'User Accounts',
region: 'center',
cls: 'grid-with-footer',
scroll: 'vertical',
bind: {
...
},
initComponent: function() {
...
Ext.applyIf(me, {
columns: [{
...
}],
features: [{
...
}],
tbar: [{ // <-- this should be horizontally scrollable.
...
}],
bbar: {
...
}
});
this.callParent();
}
});(我使用的是ExtJS 4.2.1)
发布于 2017-03-30 00:49:21
您可以将其作为dockedItem添加,而不是使用tbar,这允许更多的配置
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
overflowX: 'scroll', // <---- This allows horizontal scroll
items: [
.....
]
}]您可以在fiddle here中查看此内容
(编辑:小提琴是在ExtJS 6.2中,而不是4.2中,哇)
https://stackoverflow.com/questions/43092696
复制相似问题