Reputation: 11
How to shift the control to next node of Treeview using visual basic. if clicked on button named as "NEXT", then the cursor should shift to down ward node of treeview. thanks a lot
Upvotes: 1
Views: 399
Reputation: 175816
Use the index property
If Not tvw.SelectedItem Is Nothing Then
If (tvw.SelectedItem.Index < tvw.Nodes.Count) Then
With tvw.Nodes(tvw.SelectedItem.Index + 1)
.Selected = True
.Expanded = True
.EnsureVisible
End With
End If
End If
Upvotes: 1