Results 1 to 2 of 2

Thread: Visual Basic - TreeView Control Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    India, Mumbai
    Posts
    2

    Post

    Dear Members,

    The controls like treeview, listbox has click event. If you want to capture the right click event then we use mousedown event. We can find the pressed button in this event. But problem is the node (in case of tree view) on which user clikced left button does not get selected. This happens in Windows Explorer. If you right click or left click on any folder then it is getting selected.

    If I want to achieve this on TreeView nodes then how it can be programmed. I will be thankful to the repliers.


    Thanks

    Vinay Tandel.
    Vinay

  2. #2
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Hi,
    Instead of using the MouseDown event to find out the mouse click type, use the MouseUp event instead. The item will then be selected whether or not you pressed the right or left mouse button and you can still detect this.

    hope this helps

    Shaun
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width