OutputWindowPane 接口

表示**“输出”**窗口中的窗格。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
<GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")> _
Public Interface OutputWindowPane
[GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")]
public interface OutputWindowPane
[GuidAttribute(L"FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")]
public interface class OutputWindowPane
[<GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")>]
type OutputWindowPane =  interface end
public interface OutputWindowPane

OutputWindowPane 类型公开以下成员。

属性

  名称 说明
公共属性 Collection 获取包含支持此属性的 OutputWindowPane 对象的集合。
公共属性 DTE 获取顶级扩展性对象。
公共属性 Guid 获取 OutputWindowPane 对象的 GUID。
公共属性 Name 获取 OutputWindowPane 对象的名称。
公共属性 TextDocument 获取 OutputWindowPane 的 TextDocument 对象。

页首

方法

  名称 说明
公共方法 Activate 将焦点移到当前项。
公共方法 Clear 从 OutputWindowPane 清除所有文本。
公共方法 ForceItemsToTaskList 将所有尚未添加的任务项发送到任务列表。
公共方法 OutputString 将文本字符串发送到 OutputWindowPane 窗口。
公共方法 OutputTaskItemString “输出”窗口中显示字符串,并将相应的项添加到“任务列表”

页首

备注

**“输出”**窗口显示文本输出。 **“输出”窗口可以有一个或多个窗格,由 OutputWindowPane 对象表示。 基本上每个 IDE 工具都单独使用一个输出窗口窗格。 使用窗口顶部的下拉框选择窗格。 例如,生成错误会转到“生成错误”**窗格中,而基本上每个外部命令工具都转到其自己的唯一输出窗口窗格中。

示例

Sub OutputWindowPaneExample()
   ' Create a tool window handle for the Output window.
   Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
   ' Create handles to the Output window and its panes.
   Dim OW As OutputWindow = win.Object
   Dim OWp As OutputWindowPane

   ' Add a new pane to the Output window.
   OWp = OW.OutputWindowPanes.Add("A New Pane")
   ' Add a line of text to the new pane.
   OWp.OutputString("Some Text")
End Sub

请参阅

参考

EnvDTE 命名空间