ToolBoxTab3.ToolBoxItems Propriedade

Definição

Obtém a coleção de ToolBoxItems associada a um ToolBoxTab3 .

public:
 property EnvDTE::ToolBoxItems ^ ToolBoxItems { EnvDTE::ToolBoxItems ^ get(); };
[System.Runtime.InteropServices.DispId(6)]
public EnvDTE.ToolBoxItems ToolBoxItems { [System.Runtime.InteropServices.DispId(6)] get; }
[<System.Runtime.InteropServices.DispId(6)>]
[<get: System.Runtime.InteropServices.DispId(6)>]
member this.ToolBoxItems : EnvDTE.ToolBoxItems
Public ReadOnly Property ToolBoxItems As ToolBoxItems

Valor da propriedade

ToolBoxItems

Uma coleção de ToolBoxItems.

Implementações

Atributos

Exemplos

Este exemplo seleciona e ativa o primeiro ToolBoxTab3 Item e exibe seu nome em uma caixa de mensagem.

Imports EnvDTE  
Imports EnvDTE80  
Imports EnvDTE90  
Sub ToolBoxTabExample(ByVal dte As DTE2)  
    Dim tlBox As ToolBox  
    Dim tbxTabs As ToolBoxTabs  
    Dim tbxTab As ToolBoxTab3  
    Dim tbxItem As ToolBoxItem  
    Try  
        ' Create an object reference to the IDE's ToolBox object and  
        ' its tabs.  
        tlBox = CType(_applicationObject.Windows.Item _  
          (Constants.vsWindowKindToolbox).Object, ToolBox)  
        tbxTabs = tlBox.ToolBoxTabs  
        ' Select the first Toolbox tab.  
        tbxTab = CType(tbxTabs.Item(1), ToolBoxTab3)  
        MsgBox(tbxTab.Name)  
        tbxTab.Activate()  
        tbxItem = tbxTab.ToolBoxItems.Item(1)  
        MsgBox("Toolbox item name: " & tbxItem.Name)  
    Catch ex As System.Exception  
        MsgBox("ERROR: " & ex.Message)  
    End Try  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using EnvDTE90;  
using System.Windows.Forms;  
public void ToolBoxTabExample(DTE2 dte)  
{  
    ToolBox tlBox;  
    ToolBoxTabs tbxTabs;  
    ToolBoxTab3 tbxTab;  
    ToolBoxItem tbxItem;  
    try  
    {  
        // Create an object reference to the IDE's ToolBox object and  
        // its tabs.  
        tlBox = (ToolBox)_applicationObject.Windows.Item  
          (Constants.vsWindowKindToolbox).Object;  
        tbxTabs = tlBox.ToolBoxTabs;  
        // Select the first Toolbox Tab.  
        tbxTab = (ToolBoxTab3)tbxTabs.Item(1);  
        MessageBox.Show("The name of the first Toolbox tab is: "   
          + tbxTab.Name);  
        tbxTab.Activate();  
        tbxItem = tbxTab.ToolBoxItems.Item(1);  
        MessageBox.Show("Toolbox item name: " + tbxItem.Name);  
    }  
    catch (Exception ex)  
    {  
        MessageBox.Show("ERROR: " + ex.Message);  
    }  
}  

Comentários

Um ToolBoxTab3 pode conter um ou mais ToolBoxItem objetos.

Aplica-se a