Click to See Complete Forum and Search --> : Treeview Control


dhamu
February 9th, 2000, 12:20 PM
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.

Johnny101
February 9th, 2000, 02:33 PM
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