>How do I programatically collapse levels for the TreeView control. It defaults to expanding all nodes, but I have enough data that I want to control what's expanded and what's collapsed when it first displays.
You can use the Expanded Property
oTree.Nodes(lcSomeChildNodeKey).Parent.Expanded=.F.
Imagination is more important than knowledge