Compartilhar via


Método UIHierarchyItem.Select

Faz com que o item especificado se torne ativo na interface do usuário.

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.dll)

Sintaxe

'Declaração
Sub Select ( _
    How As vsUISelectionType _
)
void Select(
    vsUISelectionType How
)
void Select(
    [InAttribute] vsUISelectionType How
)
abstract Select : 
        How:vsUISelectionType -> unit 
function Select(
    How : vsUISelectionType
)

Parâmetros

Exemplos

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

Segurança do .NET Framework

Consulte também

Referência

UIHierarchyItem Interface

Namespace EnvDTE

Outros recursos

Como: manipular os modos de exibição de árvore, usando UIHierarchy