CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Location
    Arizona
    Posts
    1

    Treeview Control

    I am trying to program the Treeview control to behave like the treeview in Microsoft Explorer. When you click the right mouse button a popup menu appears, regardless of whether the item in the treeview is highlighted or not.

    Specifically, the behavior I have not been able to reproduce is as follows: In Explorer, when you have right-clicked and a popup is displayed, you may then right-click on another item and the popup will be displayed again adjacent to the new location (item). I cannot seem to get this to work, because the popup menu has the focus. So I guess my question is how do I manage to dispatch the popup menu and remove it's focus and reset the focus to the treeview when I try to right-click again? Suggestions are greatly appreciated.


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Treeview Control

    My suggestion would be, in the MouseDown event for the treeview, before you check for the mouse button, do either a treeview.setfocus or mnuPopup.visible = false. I'm not sure if either of these ways will work, but they were my first thoughts on the topic.

    Hope this helps,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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

Featured