次の方法で共有


ToolBoxItem Interface

Definition

Represents an item in the ToolBox.

public interface class ToolBoxItem
public interface class ToolBoxItem
__interface ToolBoxItem
[System.Runtime.InteropServices.Guid("46538D1B-4D81-4002-8BB4-DBDB65BABB23")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface ToolBoxItem
[System.Runtime.InteropServices.Guid("46538D1B-4D81-4002-8BB4-DBDB65BABB23")]
public interface ToolBoxItem
[<System.Runtime.InteropServices.Guid("46538D1B-4D81-4002-8BB4-DBDB65BABB23")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type ToolBoxItem = interface
[<System.Runtime.InteropServices.Guid("46538D1B-4D81-4002-8BB4-DBDB65BABB23")>]
type ToolBoxItem = interface
Public Interface ToolBoxItem
Derived
Attributes

Examples

Sub ToolBoxItemExample()  
    Dim tlBox As ToolBox  
    Dim tbxTabs As ToolBoxTabs  
    Dim tbxTab As ToolBoxTab  
    Dim tbxItem As ToolBoxItem  

    Try  
        ' Create an object reference to the IDE's ToolBox object and  
        ' its tabs.  
        tlBox = DTE.Windows.Item(Constants.vsWindowKindToolbox).Object  
        tbxTabs = tlBox.ToolBoxTabs  

        ' Select the first ToolBox tab.  
        tbxTab = tbxTabs.Item(1)  
        tbxTab.Activate()  
        tbxItem = tbxTab.ToolBoxItems.Item(4)  
        MsgBox("ToolBox item name: " & tbxItem.Name)  

    Catch ex As System.Exception  
        MsgBox("ERROR: " & ex.Message)  
    End Try  
End Sub  

Remarks

A ToolBoxItem object can contain controls, text, HTML fragments, or other objects.

Properties

Collection

Gets the collection containing the ToolBoxItem object supporting this property.

DTE

Gets the top-level extensibility object.

Name

Gets or sets the name of the ToolBoxItem object.

Methods

Delete()

Removes the ToolBoxItem object from the collection.

Select()

Causes this item to become active in the integrated development environment (IDE).

Applies to