TextPanes 接口

包含文本编辑器窗口中的所有 TextPane 对象。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
<GuidAttribute("D9013D31-3652-46B2-A25A-29A881B9F86B")> _
Public Interface TextPanes _
    Inherits IEnumerable
[GuidAttribute("D9013D31-3652-46B2-A25A-29A881B9F86B")]
public interface TextPanes : IEnumerable
[GuidAttribute(L"D9013D31-3652-46B2-A25A-29A881B9F86B")]
public interface class TextPanes : IEnumerable
[<GuidAttribute("D9013D31-3652-46B2-A25A-29A881B9F86B")>]
type TextPanes =  
    interface 
        interface IEnumerable 
    end
public interface TextPanes extends IEnumerable

TextPanes 类型公开以下成员。

属性

  名称 说明
公共属性 Count 获取一个值,该值指示 TextPanes 集合中对象的数目。
公共属性 DTE 获取顶级扩展性对象。
公共属性 Parent 获取 TextPanes 集合的直接父对象。

页首

方法

  名称 说明
公共方法 GetEnumerator 获取集合中项的枚举。
公共方法 Item 返回 TextPanes 集合中的一个 TextPane 对象。

页首

备注

可以将文本编辑器窗口拆分成两个窗格。 TextPane 对象使您可以访问与每个窗格关联的特定文本选定内容及其属性(如高度、宽度等)。 TextPanes 集合包含文本编辑器窗口的一个或多个这些 TextPane 对象。

示例

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

请参阅

参考

EnvDTE 命名空间