Expand Minimize
This topic has not yet been rated - Rate this topic

VSConstants.VsUIHierarchyWindowCmdIds Enumeration

An enumeration of commands that apply to events unique to the IVsUIHierarchyWindow.

Namespace:  Microsoft.VisualStudio
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
[GuidAttribute("60481700-078b-11d1-aaf8-00a0c9055a90")]
public enum VsUIHierarchyWindowCmdIds
Member nameDescription
UIHWCMDID_CancelLabelEditOccurs when the user hits the escape key and causes an editable tree node to turn back into static text.
UIHWCMDID_CommitLabelEditOccurs when a tree node turns from an editable entry field back into static text.
UIHWCMDID_DoubleClickOccurs when the user double clicks the mouse on the tree's pane.
UIHWCMDID_EnterKeyOccurs when the user hits the Enter key while the tree's pane has focus.
UIHWCMDID_RightClickOccurs when the user right clicks the mouse over the tree's pane.
UIHWCMDID_StartLabelEditOccurs when tree node text becomes an editable entry field.

The UIHWCMDID_RightClick command is what tells the interface IVsUIHierarchy in a IVsUIHierarchyWindow to display the context menu. Since the mouse position may change between the mouse down and the mouse up events and the right click command might even originate from the keyboard Visual Studio provides the proper menu position into pvaIn by performing a memory copy operation on a POINTS structure into the VT_UI4 part of the pvaIn variant.

To show the menu use the derived POINTS as the coordinates to show the context menu, calling ShowContextMenu. To ensure proper command handling you should pass a NULL command target into ShowContextMenu menu so that the IVsUIHierarchyWindow will have the first chance to handle commands like delete.

The events UIHWCMDID_StartLabelEdit, UIHWCMDID_CommitLabelEdit, and UIHWCMDID_CancelLabelEdit are for notification only. Changing the text of the node will be handled through SetProperty with the property set to VSHPROPID_EditLabel.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.