Share via


TextPanes Interface

Definition

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

public interface class TextPanes : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("D9013D31-3652-46B2-A25A-29A881B9F86B")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface TextPanes : System.Collections.IEnumerable
[System.Runtime.InteropServices.Guid("D9013D31-3652-46B2-A25A-29A881B9F86B")]
public interface TextPanes : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("D9013D31-3652-46B2-A25A-29A881B9F86B")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type TextPanes = interface
    interface IEnumerable
[<System.Runtime.InteropServices.Guid("D9013D31-3652-46B2-A25A-29A881B9F86B")>]
type TextPanes = interface
    interface IEnumerable
Public Interface TextPanes
Implements IEnumerable
Attributes
Implements

Examples

Sub TextPanesExample(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 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).");  
}  

Remarks

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.

Properties

Count

Gets a value indicating the number of objects in the TextPanes collection.

DTE

Gets the top-level extensibility object.

Parent

Gets the immediate parent object of a TextPanes collection.

Methods

GetEnumerator()

Gets an enumeration for items in a collection.

Item(Object)

Returns a TextPane object in a TextPanes collection.

Applies to