This documentation is archived and is not being maintained.

ActiveTab Property

Visual Studio .NET 2003

Returns the currently selected item in the ToolBox.

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

Return Value

Returns a ToolBoxTab object.


Sub ActiveTabExample()
   ' This activates a specific tab in 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

   If objToolbox.ActiveTab.Name <> "MyTab" Then
      ' Activate the second tab in the Toolbox.
   End If
End Sub

See Also

Applies To: ToolBox Object