Visual Basic: Windows Controls
Returns or sets a value that determines whether a Node object in a TreeView control is currently expanded or collapsed.
The Expanded property syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|boolean||A Boolean expression that specifies whether the node is expanded or collapsed.|
The settings for boolean are:
|True||The Node is currently expanded.|
|False||The Node is currently collapsed.|
You can use the Expanded property to programmatically expand a Node object. The following code has the same effect as double-clicking the first Node:
TreeView1.Nodes(1).Expanded = True
When a Node object is expanded, the Expand event is generated.
If a Node object has no child nodes, the property value is ignored.