- edited description
How can I keep selected tree expanded but other tree collapsed?
Currently if you’ve expanded a node, it will stay expanded while you select another node. After expanding multiple nodes, the vertical scroll distance will be larger and larger. Imagine having a large tree, this will make navigating to the wanted item difficault.
So my question is, when I select(expand) a node, how to collapse all the other expanded nodes? and move the view part of the scroll to the node just selected.
Comments (3)
-
reporter -
reporter - edited description
-
I have had a similar request for scrolling to a selected node. I have to research this a bit. I can do something similar to what I’ve done in another project but it assumes all node in the scroll body have the same height. And it was also not nested. I will test some theories and hopefully have a solution.
As far as collapsing nodes, there is a function on the
TreeViewController
that will collapse all nodes. If you have the key of the node you to be expanded, than you can collapse all and expand just that one. - Log in to comment