Yes, this would be useful. I’ve logged a feature request for Desktop and Web.
I plan to add three methods:
TreeView.RootNodes() to get the top-level nodes.
TreeViewNode.Children() to get a node’s immediate children.
TreeView.AllNodes() to get every node, visiting each parent before its children, including descendants of collapsed nodes.
Each will return an Array(Of TreeViewNode), so you can use For Each to loop through the nodes and update their Text, Tag or other properties.
The arrays will contain references to the actual nodes, with membership and order captured when you call the method. Changing the returned array won’t change the tree’s structure.
I’m keeping programmatic reordering and sorting outside this request for now.