Partilhar via


TextWindow Interface

Definition

Represents a window containing a text document.

public interface class TextWindow
public interface class TextWindow
__interface TextWindow
[System.Runtime.InteropServices.Guid("2FC54DC9-922B-44EB-8CC0-BA182584DC4B")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface TextWindow
[System.Runtime.InteropServices.Guid("2FC54DC9-922B-44EB-8CC0-BA182584DC4B")]
public interface TextWindow
[<System.Runtime.InteropServices.Guid("2FC54DC9-922B-44EB-8CC0-BA182584DC4B")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type TextWindow = interface
[<System.Runtime.InteropServices.Guid("2FC54DC9-922B-44EB-8CC0-BA182584DC4B")>]
type TextWindow = interface
Public Interface TextWindow
Attributes

Examples

Sub TextWindowExample(ByVal dte As EnvDTE.DTE)  
    Dim objTW As TextWindow  
    Dim colPanes As TextPanes  

    objTW = dte.ActiveWindow.Object  
    colPanes = objTW.Panes  
    MsgBox("The """ & objTW.Parent.Caption & """ window contains " & _  
    Str(colPanes.Count) & " pane(s).")  
End Sub  
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).");  
}  

Remarks

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.

Properties

ActivePane

Gets the most recently active pane in the Text window.

DTE

Gets the top-level extensibility object.

Panes

Gets the collection of panes in the TextWindow object.

Parent

Gets the immediate parent object of a TextWindow object.

Selection

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

Applies to