Export (0) Print
Expand All
Cut
Run
Expand Minimize

Select Method (UIHierarchyItem Object)

Visual Studio .NET 2003

Causes the specified item to become active in the user interface.

[Visual Basic .NET]
Public Sub Select( _
   ByVal How As vsUISelectionType _
) 
[Visual Basic 6]
Sub Select( _
   ByVal How As vsUISelectionType _
) 
[C++]
HRESULT __stdcall Select(
   vsUISelectionType How
);
[C#]
public void Select(
   vsUISelectionType How
);
[JScript .NET]
public function Select(
   How : vsUISelectionType
)

Parameters

How
A vsUISelectionType constant indicating how the selection is made.

Example

Sub SelectExample()
   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

See Also

Manipulating Tree Views Using UIHierarchy

Applies To: UIHierarchyItem Object

Show:
© 2014 Microsoft