TextWindow Interface

 

Represents a window containing a text document.

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

[GuidAttribute("2FC54DC9-922B-44EB-8CC0-BA182584DC4B")]
public interface TextWindow

NameDescription
System_CAPS_pubpropertyActivePane

Gets the most recently active pane in the Text window.

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyPanes

Gets the collection of panes in the TextWindow object.

System_CAPS_pubpropertyParent

Gets the immediate parent object of a TextWindow object.

System_CAPS_pubpropertySelection

Gets an object representing the current selection on the TextWindow object.

The TextWindow object is returned by the Object property of the Window object when the window is a core editor window. When the document in the window is an HTML document, then, depending on whether the Design view or the Source view is set, you get an HTMLWindow or TextWindow object.

public void TextWindowExample(_DTE dte)
{
    TextWindow tw;
    TextPanes tps;

    tw = (TextWindow)dte.ActiveWindow.Object;
    tps = tw.Panes;
    MessageBox.Show ("The \"" + tw.Parent.Caption + "\"" + " window 
    contains " + tps.Count.ToString () + " pane(s).");
}
Return to top
Show: