robhermans
Member
- Joined
- Sep 26, 2009
- Messages
- 6
- Programming Experience
- 10+
Hi:
I am using VS 2005 with WM 6 professional SDK to develop PDA app. I am using the treeview ... a couple of problems:
1. When I loop thru the nodes to search for a node using the following code I only see the parent nodes whereas a nodecount gives 38 I have 3 parents, 6 children and 29 grandchildren.
MsgBox(tvFind.GetNodeCount(True))
For Each n As TreeNode In tvFind.Nodes
MsgBox("Looking for " & sFindItem)
MsgBox("this Node:" & UCase$(n.Text))
If InStr(UCase$(n.Text), sFindItem) > 0 Then
lInstance = lInstance + 1
If lInstance >= lItemIndex Then
'MsgBox UCase$(oThisNode.Text)
'Found matching item
TreeViewFindNode = n
Exit For
End If
End If
Next
2. When a node is selected in code it is not highlighted - if I tap the treeview anywhere the selected node is highlighted ... I don't know how to get the focus on the treeview - can I simulate a tap?
Many thanks for any help - I am a beginner and welcome all help and advice!
Rob
I am using VS 2005 with WM 6 professional SDK to develop PDA app. I am using the treeview ... a couple of problems:
1. When I loop thru the nodes to search for a node using the following code I only see the parent nodes whereas a nodecount gives 38 I have 3 parents, 6 children and 29 grandchildren.
MsgBox(tvFind.GetNodeCount(True))
For Each n As TreeNode In tvFind.Nodes
MsgBox("Looking for " & sFindItem)
MsgBox("this Node:" & UCase$(n.Text))
If InStr(UCase$(n.Text), sFindItem) > 0 Then
lInstance = lInstance + 1
If lInstance >= lItemIndex Then
'MsgBox UCase$(oThisNode.Text)
'Found matching item
TreeViewFindNode = n
Exit For
End If
End If
Next
2. When a node is selected in code it is not highlighted - if I tap the treeview anywhere the selected node is highlighted ... I don't know how to get the focus on the treeview - can I simulate a tap?
Many thanks for any help - I am a beginner and welcome all help and advice!
Rob
Last edited: