I have a tree view, and right clicking on nodes brings up a popup
menu. Right clicking in empty space brings up a popup menu for the
tree root. When a root menu pops up, I want to make sure that no node
is highlighted, so that it is clear that the user is working with the
root node. Right clicking the empty space below the list of nodes
achieves the correct result, but right clicking in the empty space to
the right of a node brings up the root menu, but leaves the node
highlighted. Commenting out the relevant code, it seems to me that
right clicking the empty space to the right of the node always
highlights the node. Why is this, and how do I fix it?
Private Sub tvcPartsTree_MouseUp(ByVal Button As Integer, ByVal Shift
As Integer, ByVal X As Long, ByVal Y As Long)
If Button = acRightButton Then
pTree.SelectedItem = pTree.HitTest(X, Y)
If pTree.SelectedItem Is Nothing Then
DisplayPopupMenu ROOT_MODE
Else
DisplayPopupMenu NODE_MODE
End If
End If
End Sub
I don't have any code in any other mouse events.
Garrett Berneche - 31 Mar 2009 16:33 GMT
Sorry,I realize this is not the appropriate venue for my question. I
am using Google Groups, and for some reason it posted to the wrong
group.
Jan Hyde - 01 Apr 2009 12:42 GMT
Garrett Berneche <punkrockdontcare@gmail.com>'s wild
thoughts were released on Tue, 31 Mar 2009 08:33:21 -0700
(PDT) bearing the following fruit:
>Sorry,I realize this is not the appropriate venue for my question. I
>am using Google Groups, and for some reason it posted to the wrong
>group.
It might not be the 'best' group to post to, but no-one is
going to complain about your post here.
--
Jan Hyde