Javascript autoscroll在树面板上不工作
我尝试将滚动条添加到树面板,但即使添加了Javascript autoscroll在树面板上不工作,javascript,extjs,scroll,extjs5,treepanel,Javascript,Extjs,Scroll,Extjs5,Treepanel,我尝试将滚动条添加到树面板,但即使添加了autoscroll:true它也不会滚动 以下是小组讨论: Ext.create('Ext.tree.Panel', { title: 'asdasd', autoscroll:true, store: store,
autoscroll:true
它也不会滚动
以下是小组讨论:
Ext.create('Ext.tree.Panel', {
title: 'asdasd',
autoscroll:true,
store: store,
rootVisible: false,
});
另外,我在新窗口上显示了这个面板。如果您使用ExtJS5,那么应该使用可滚动的
配置。()
这是我为试一试而做的小提琴:
是的,我做了,它也不起作用。@Alexander请共享整个配置,包括窗口
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [{
text: "Grand Parent",
checked: false,
isSelected: false,
id: '1',
children: [{
text: 'Child Node',
checked: false,
IsSelected: false,
id: '1.1',
children: [{
text: "Grand Child One",
expanded: true,
checked: false,
isSelected: false,
id: '1.1.1',
}, {
text: "Grand Child Two",
expanded: true,
checked: false,
isSelected: false,
id: '1.1.2',
}, {
text: "Grand Child Three",
expanded: true,
checked: false,
isSelected: false,
id: '1.1.3',
}]
}, {
text: 'Child Two',
checked: false,
isSelected: false,
id: '1.2',
children: [{
text: "Grand Child Four",
expanded: true,
checked: false,
isSelected: false,
id: '1.2.1',
}]
}]
}]
}
});
Ext.create('Ext.tree.Panel', {
title: 'Example Tree',
width: 200,
height: 450,
store: store,
rootVisible: false,
multiSelect: true,
scrollable: true,
renderTo: Ext.getBody(),
});