tree.focusItem (myId) selected item at top of window


If I have a large tree and call


the tree is displayed with the selected item right at the top of the window.
I would much prefer the selected item to be in the middle, or even the bottom of the window, so the user has a better idea of where the node comes in the hierarchy.
I can’t find anything in the API to help.
Can you suggest a solution, thanks?



there is not a public method to scroll Tree into a specific position. But you can try to set scrollTop for the tree container, for example:

myTree.allTree.scrollTop = 200;