Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Enterprise Development / April 2009



Tip: Looking for answers? Try searching our database.

VB 6 TreeView Clicking empty space to the right of a node

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Garrett Berneche - 31 Mar 2009 16:29 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.