Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Selects the node immediately below the currently selected node with respect to the tree's current expansion state.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub SelectDown ( _
How As vsUISelectionType, _
Count As Integer _
)
void SelectDown(
vsUISelectionType How,
int Count
)
void SelectDown(
[InAttribute] vsUISelectionType How,
[InAttribute] int Count
)
abstract SelectDown :
How:vsUISelectionType *
Count:int -> unit
function SelectDown(
How : vsUISelectionType,
Count : int
)
Parameters
How
Type: EnvDTE.vsUISelectionTypeRequired. A vsUISelectionType constant indicating how the selection is made.
Count
Type: System.Int32Required. The number of nodes to select down from the current node. Count is also used for coalescing commands while recording. That is, if you type SHIFT + DOWN ARROW four times, rather than four lines of code emitted, you instead get one line with a Count value of 4.
Remarks
SelectDown is useful for SHIFT-click macro recording or moving down or up with the arrow keys. It is useful because the behavior of SelectDown mimics the behavior of using the ARROW and SHIFT+ARROW keys in a tree view.
Examples
Sub SelectDownExample()
Dim UIH As UIHierarchy = _
DTE.Windows.Item(Constants.vsWindowKindMacroExplorer).Object
Dim UIHItem As UIHierarchyItem = UIH.GetItem("Macros\Samples")
UIHItem.Select(vsUISelectionType.vsUISelectionTypeSetCaret)
If UIHItem.IsSelected = False Then
If UIH.UIHierarchyItems.Expanded = True Then
MsgBox("Node is expanded.")
Else
MsgBox("Node is not expanded.")
End If
End If
UIH.SelectDown(vsUISelectionType.vsUISelectionTypeSelect, 2)
UIH.DoDefaultAction()
UIH.SelectDown(vsUISelectionType.vsUISelectionTypeSelect, 1)
UIH.SelectUp(vsUISelectionType.vsUISelectionTypeExtend, 1)
End Sub
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.