|
-
Aug 2nd, 2000, 06:44 AM
#1
Thread Starter
New Member
Hi All,
I have a quick question about TreeView control.
Is it possible to expand all nodes in a treeview at runtime (once the tree is populated), without the user having to click on each parent node to expand the child nodes seperately? I've looked through the Books Online, MSDN and other help sources but can't find any information about this topic.
Regards
Delphy
-
Aug 2nd, 2000, 07:56 AM
#2
Fanatic Member
You can enumarate the Nodes collection, and make sure each nodes expanded property is set to true.
Code:
Dim myNode As Node
For Each myNode In TreeView1.Nodes
myNode.Expanded = True
Next
Iain, thats with an i by the way!
-
Aug 2nd, 2000, 09:13 AM
#3
Thread Starter
New Member
Thanks
Ah-ha, thanks I knew it would probably be something simple like this.
Cheers
Delphy
-
Aug 2nd, 2000, 10:09 AM
#4
Frenzied Member
Originally posted by delphy
Hi All,
I have a quick question about TreeView control.
Is it possible to expand all nodes in a treeview at runtime (once the tree is populated), without the user having to click on each parent node to expand the child nodes seperately? I've looked through the Books Online, MSDN and other help sources but can't find any information about this topic.
Regards
Delphy
As you're loading the tree, include the following
node.EnsureVisible (I do it below the set statement)
[Edited by JHausmann on 08-02-2000 at 11:12 AM]
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
|