TreeView Children?

J

Joe Cletcher

I have added the "treeview" control ["Microsoft TreeView
Control 6.0 (SP6)"] to a user defined form but am unable
to assign child nodes. I can add nodes with the commands

aTreeView.Nodes.Add = "Critical Concerns"
aTreeView.Nodes.Add = "Fundamentals"

I have been unable to add a child to either parent node
("Critical Concerns" or "Fundamentals"). I can't declare
(dim) a variable as type "Node" or "TreeNode" because
those type(s) are not available. I can't use the
aTreeView.BeginUpdate method (and others) because it
isn't available either. I must not be referencing
something correctly?

Any ideas?
 
J

Joe Cletcher

Sorry, I was adding the node incorrectly. Should have
done the following:

Dim RootNode as Node
Set RootNode = aTreeView.Nodes.Add(, tvwNext)
RootNode.Text = "Critical Concerns"
Dim ChildNode as Node
Set ChildNode = aTreeView.Nodes.Add(, tvwChild)
Set ChildNode.Parent = RootNode
ChildNode.Text = "Handling"

Of course, I really "looped" through ADODB record sets to
define the "RootNodes" and the corresponding "ChildNodes".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top