2015-05-14 58 views
0

我有一个treepanel和一个扩展树并选择一个特定节点的过程。问题是 - 我不知道如何滚动到这个节点,以便它变得可见。我尝试这两种方法,我已经看到了在计算器和其他论坛:无法滚动到树节点

1. 
tree.getSelectionModel().select(node); 
tree.getView().focusRow(node); 

2. 
location.hash=node.data.id; 

回答

1

使用selectPath method

tree.selectPath(node.getPath())