Export (0) Print
Expand All
ID
Top
Expand Minimize

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
[C++]
HRESULT __stdcall get_ToolBoxItems(
   /* [out, retval] */ ToolBoxItems** retVal
);
[C#]
public ToolBoxItems ToolBoxItems {get;}
[JScript .NET]
public function get ToolBoxItems() : ToolBoxItems

Return Value

Returns a ToolBoxItems collection.

Remarks

A ToolBox tab can contain one or more ToolBoxItem objects.

Example

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

Show:
© 2014 Microsoft