Share via


ToolBoxTab2.ToolBoxItems Property

Gets the collection of ToolBoxItems associated with a ToolBoxTab.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
ReadOnly Property ToolBoxItems As ToolBoxItems
'Usage
Dim instance As ToolBoxTab2 
Dim value As ToolBoxItems 

value = instance.ToolBoxItems
ToolBoxItems ToolBoxItems { get; }
property ToolBoxItems^ ToolBoxItems {
    ToolBoxItems^ get ();
}
function get ToolBoxItems () : ToolBoxItems

Property Value

Type: EnvDTE.ToolBoxItems
A ToolBoxItems collection.

Implements

ToolBoxTab.ToolBoxItems

Remarks

A ToolBoxTab can contain one or more ToolBoxItem objects.

Examples

Sub ToolBoxAddExample()
    ' This adds a Text item to the first tab of the Toolbox.
    ' Define the variables and create an object reference to the IDE's 
    ' ToolBox object.
    Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindToolbox)
    Dim tlbox As ToolBox = win.Object
    Dim tbxTabs As ToolBoxTabs

    ' Create an object reference to the ToolBoxTabs object.
    tbxTabs = tlbox.ToolBoxTabs

    ' Add a new Text item to the first tab in the Toolbox.
    tbxTabs.Item(1).ToolBoxItems.Add("New Text Item", "Some text to _
    add to the document.", vsToolBoxItemFormat.vsToolBoxItemFormatText)
End Sub

.NET Framework Security

See Also

Reference

ToolBoxTab2 Interface

ToolBoxTab2 Members

ToolBoxItems Overload

EnvDTE80 Namespace