TreeView

PepSoft

Member
Licensed User
Longtime User
Hello:

In a TreeView:
In the AfterSelect even. How I can get the Index of Child node?

-Germany
--Bonn
--Berlin
-Italy
--Roma
--Pissa
--Napoles
-France
--Paris
--Lion

When the user selects "Pissa" How I can get the Index and subindex of "Pissa"?

thanks
 
thanks for your reply. But still not working well.

Sub Globals
'Declare the global variables here.
End Sub

Sub App_Start
Form1.Show
CreateTree
End Sub

Sub CreateTree
Tv.New1("Form1",10,10,100,150)
Node1.New1
Node2.New1
Node3.New1
Tv.AddNewNode("Germany")
Tv.AddNewNode("Italy")
Tv.AddNewNode("France")
Node1.Value=Tv.GetNode(0)
Node1.AddNewNode("Bonn")
Node1.AddNewNode("Berlin")
Node1.Value=Tv.GetNode(1)
Node1.AddNewNode("Roma")
Node1.AddNewNode("Pissa")
Node1.Value=Tv.GetNode(2)
Node1.AddNewNode("Paris")
Node1.AddNewNode("Lion")
End Sub

Sub Tv_AfterSelect
'TextTree IndTree TextNod and IndNode are TextBox
TextTree.Text=Tv.SelectedText
IndTree.Text=Tv.IndexOfNode(Tv.SelectedNode)
Node1.Value=Tv.SelectedNode
TextNod.Text=Node1.Text
IndNode.Text=Node1.IndexOfNode(Node1.Value)
End Sub

I want IndTree is the Index of the parent and the child index is IndNod. But both are the same. Can you help me? Thanks

PepSoft
 

Attachments

Back
Top