Collapse the table of content
Expand the table of content

ToolBoxItems Property

Visual Studio .NET 2003

Returns the collection of ToolBox items associated with a ToolBox tab.

[Visual Basic .NET]
Public ReadOnly Property ToolBoxItems() As ToolBoxItems
[Visual Basic 6]
Property Get ToolBoxItems() As ToolBoxItems
HRESULT __stdcall get_ToolBoxItems(
   /* [out, retval] */ ToolBoxItems** retVal
public ToolBoxItems ToolBoxItems {get;}
[JScript .NET]
public function get ToolBoxItems() : ToolBoxItems

Return Value

Returns a ToolBoxItems collection.


A ToolBox tab can contain one or more ToolBoxItem objects.


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 objToolbox As ToolBox = win.Object
   Dim colTbxTabs As ToolBoxTabs

   ' Create an object reference to the ToolBoxTabs object.
   colTbxTabs = objToolbox.ToolBoxTabs

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

See Also

Applies To: ToolBoxTab Object

© 2015 Microsoft