ToolBoxTab2.ToolBoxItems 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与关联的的集合 ToolBoxItems ToolBoxTab 。
public:
property EnvDTE::ToolBoxItems ^ ToolBoxItems { EnvDTE::ToolBoxItems ^ get(); };
[System.Runtime.InteropServices.DispId(6)]
public EnvDTE.ToolBoxItems ToolBoxItems { [System.Runtime.InteropServices.DispId(6)] get; }
[<System.Runtime.InteropServices.DispId(6)>]
[<get: System.Runtime.InteropServices.DispId(6)>]
member this.ToolBoxItems : EnvDTE.ToolBoxItems
Public ReadOnly Property ToolBoxItems As ToolBoxItems
属性值
一个 ToolBoxItems 集合。
实现
- 属性
示例
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
注解
ToolBoxTab可以包含一个或多个 ToolBoxItem 对象。