Export (0) Print
Expand All

TextPanes Interface

Contains all of the TextPane objects in a text editor window.

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

public interface TextPanes : IEnumerable

The TextPanes type exposes the following members.

Public propertyCountGets a value indicating the number of objects in the TextPanes collection.
Public propertyDTEGets the top-level extensibility object.
Public propertyParentGets the immediate parent object of a TextPanes collection.

Public methodGetEnumeratorGets an enumeration for items in a collection.
Public methodItemReturns a TextPane object in a TextPanes collection.

You can split a text editor window into two panes. The TextPane object gives you access to the specific text selection associated with each pane, as well as its properties, such as height and width. The TextPanes collection contains one or more of these TextPane objects for a text editor window.

public void TextPanesExample(_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).");

Community Additions

© 2015 Microsoft