I did not go any further with my version, but
@CJ_London pointed out several possible enhancements. If you know the upper most levels (which you often do) then by storing the relation at all levels you can speed up the expanding and collapsing. Using the same idea but using a continuous form allows you to format and color the "nodes" at different levels. Is there some specific functionality you are looking at? May want to ask
@CJ_London for his copy. Any reason not to use a real treeview control? Legitimate question since there are many reasons like stability why you may choose not to.