Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

TextPane Interface

Represents a pane within a text editor window.

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

[GuidAttribute("0A3BF283-05F8-4669-9BCB-A84B6423349A")] 
public interface TextPane
/** @attribute GuidAttribute("0A3BF283-05F8-4669-9BCB-A84B6423349A") */ 
public interface TextPane
GuidAttribute("0A3BF283-05F8-4669-9BCB-A84B6423349A") 
public interface TextPane

You can split a text editor window into two panes. The TextPane object gives you access to the text selected in each pane, as well as the pane's properties such as height, width, and so on.

public void TextPaneExample(_DTE dte)
{
    TextWindow tw;
    TextPane tpn;
    TextPoint tpt;

    tw = (TextWindow)dte.ActiveWindow.Object;
    tpn = tw.ActivePane;
    MessageBox.Show ("The active pane is " + tpn.Height.ToString () + " 
    lines high and " + tpn.Width.ToString () + " columns wide.");
    tpt = tpn.StartPoint;
    MessageBox.Show ("It begins at line " + tpt.Line.ToString () + ", 
    column " + tpt.LineCharOffset.ToString () + ".");
}

Community Additions

ADD
Show:
© 2015 Microsoft