ToolBoxItem 接口
更新:2007 年 11 月
表示“工具箱”中的项。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
<GuidAttribute("46538D1B-4D81-4002-8BB4-DBDB65BABB23")> _
Public Interface ToolBoxItem
用法
Dim instance As ToolBoxItem
[GuidAttribute("46538D1B-4D81-4002-8BB4-DBDB65BABB23")]
public interface ToolBoxItem
[GuidAttribute(L"46538D1B-4D81-4002-8BB4-DBDB65BABB23")]
public interface class ToolBoxItem
public interface ToolBoxItem
备注
ToolBoxItem 对象可包含控件、文本、HTML 段落或其他对象。
示例
Sub ToolBoxItemExample()
Dim tlBox As ToolBox
Dim tbxTabs As ToolBoxTabs
Dim tbxTab As ToolBoxTab
Dim tbxItem As ToolBoxItem
Try
' Create an object reference to the IDE's ToolBox object and
' its tabs.
tlBox = DTE.Windows.Item(Constants.vsWindowKindToolbox).Object
tbxTabs = tlBox.ToolBoxTabs
' Select the first ToolBox tab.
tbxTab = tbxTabs.Item(1)
tbxTab.Activate()
tbxItem = tbxTab.ToolBoxItems.Item(4)
MsgBox("ToolBox item name: " & tbxItem.Name)
Catch ex As System.Exception
MsgBox("ERROR: " & ex.Message)
End Try
End Sub