Export (0) Print
Expand All

ToolBoxTab Object

Visual Studio .NET 2003

Represents a tab in the ToolBox, along with any objects the tab contains.

DTE

   Windows

      Window

         ToolBox

            ToolBoxTabs

               ToolBoxTab

[Visual Basic .NET]
Public Interface ToolBoxTab
    Inherits IDispatch
[Visual Basic 6]
Class ToolBoxTab
[C++]
interface ToolBoxTab : IDispatch
[C#]
public interface ToolBoxTab : IDispatch
[JScript .NET]
public interface ToolBoxTab extends IDispatch

Requirements

Namespace: EnvDTE

File: dte.olb

Example

Sub ToolBoxTabExample()
   Dim objToolbox As ToolBox
   Dim colTbxTabs As ToolBoxTabs
   Dim objTab As ToolBoxTab
   Dim colTbxItems As ToolBoxItems
   Dim objTbxItem As ToolBoxItem

   ' Create an object reference to the IDE's ToolBox object.    
   objToolbox = DTE.Windows.Item(Constants.vsWindowKindToolbox).Object
   colTbxTabs = objToolbox.ToolBoxTabs

   ' Add a new tab to the ToolBox.
   objTab = colTbxTabs.Add("Sample ToolBoxTab")
   colTbxTabs = objToolbox.ToolBoxTabs

   ' Use the ToolboxItems collection to access all the items under a 
   ' ToolBoxTab.
   colTbxItems = objTab.ToolBoxItems

   ' Add a couple new ToolboxItem objects to the new tab we added above.
   objTbxItem = objTab.ToolBoxItems.Add("Text Item", "Hello world")
   objTbxItem = objTab.ToolBoxItems.Add("HTML Item", "Hello world", vsToolBoxItemFormat.vsToolBoxItemFormatHTML)
End Sub

See Also

Properties, Events, and Methods | ToolBox Object | ToolBoxItem Object | ToolBoxTab Object | ToolBoxTabs Collection

Show:
© 2014 Microsoft