|
-
August 14th, 2001, 02:26 PM
#1
Expand and Collapse TreeView
Hi,
I need to know how cani programmatically expand or collapse a treeview.
Thanks in advance
"the opposition of the opposites is the engine of becoming"
-
August 14th, 2001, 08:03 PM
#2
Re: Expand and Collapse TreeView
TreeView1.Nodes("NodeKey").Expanded = true
' or
Treeview1.Nodes(3).Expanded = true
You can not expand the entire treeview with one statement. You must expand individual nodes
John G
-
August 15th, 2001, 07:23 AM
#3
Re: Expand and Collapse TreeView
'Just addidtion to the John's answer - how to switch between expand/collapse
private Sub Command1_Click()
With TreeView1
.Nodes.Add , , "aaa", "aaa"
.Nodes.Add "aaa", tvwChild, "bbb", "bbb"
.Nodes("aaa").Expanded = true
End With
End Sub
private Sub Command2_Click()
TreeView1.Nodes("aaa").Expanded = Not TreeView1.Nodes("aaa").Expanded
End Sub
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|