Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
918
Tree navagation
posted

If I use node.sibling is that the node directly under the active node or is it a node further down the branch.

node

node  (is this the sibling next)  or

node---|

              node  ( or is this the sibling next)  if this isn't the sibling next how do I access it.

Parents
  • 515
    posted

    Hi morrisd

    For clarification, i have labelled the nodes in your example:

    morrisd said:

    If I use node.sibling is that the node directly under the active node or is it a node further down the branch.

    "node1"

    "node2"  (is this the sibling next)  or     

    "node3"---|

                  "node3-1"  ( or is this the sibling next)  if this isn't the sibling next how do I access it.

    The "siblings" of node1 are node2 and node3. So, node2 is sibling next from node1.
    To access node3-1, you must get at the "children" of node3. To do this, look at node3's Nodes collection.

    You can access any node from any other node, using the node parent, sibling and .Nodes

Reply Children