This topic has not yet been rated - Rate this topic

OutputWindowPane.OutputString Method

Sends a text string to the OutputWindowPane window.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

void OutputString (
	[InAttribute] string Text
)
void OutputString (
	/** @attribute InAttribute() */ String Text
)
function OutputString (
	Text : String
)

Parameters

Text

Required. The text characters to send to the window.

This method does not automatically add newline characters to the string. If you want such characters in the string, you must add them to Text.

public void OutputStringExample(DTE2 dte)
{
    // Find and show the "Test Pane" Output window pane.
    OutputWindow outputWin = dte.ToolWindows.OutputWindow;
    OutputWindowPane pane;

    try
    {
        pane = outputWin.OutputWindowPanes.Item("Test Pane");
    }
    catch (Exception)
    {
        pane = outputWin.OutputWindowPanes.Add("Test Pane");
    }

    outputWin.Parent.Activate();
    pane.Activate();

    // Add a line of text to the new pane.
    pane.OutputString("Some text." + "\r\n");
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.