Click to See Complete Forum and Search --> : Using DOM in VB


Elangovan
July 16th, 2001, 12:37 AM
Dear Sir,

I need to create a parent node say "subjectset" for the nodes "subject". I have already written the code, but it works well, only if the node "subject" is the immediate child node of the root element.

What I want is, wherever may be the "subject" node, I need to create a parent "subjectset" for it. I am struggling to solve this out. Can u pls. help me out ??

Thanks,
Elangovan O.

TheAvenger
July 26th, 2001, 03:28 AM
'I do not know what is DOM, but if you're looking for
'sintax of treeview control, here is an example:
private Sub Command1_Click()
With TreeView1

.Nodes.Add , , "R", "Root"
.Nodes.Add , , "Subjects", "Subjects"
.Nodes.Add , , "Subjects2", "Subjects2"
.Nodes.Add "Subjects", tvwChild, "ChildSubject", "ChildSubject"
.Nodes.Add "Subjects2", tvwChild, "ChildSubject2", "ChildSubject2"
.Nodes("Subjects").Expanded = true
.Nodes("Subjects2").Expanded = true

End With

End Sub

Elangovan
July 26th, 2001, 03:46 AM
I solved the problem myself. Anyhow thanks for the code which u had sent.

Thanks,
Elangovan O.