TextSelection.PageDown 方法

在文档中将活动点向下移动指定页数,从而滚动视图。

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

语法

声明
Sub PageDown ( _
    Extend As Boolean, _
    Count As Integer _
)
void PageDown(
    bool Extend,
    int Count
)
void PageDown(
    [InAttribute] bool Extend, 
    [InAttribute] int Count
)
abstract PageDown : 
        Extend:bool * 
        Count:int -> unit
function PageDown(
    Extend : boolean, 
    Count : int
)

参数

  • Extend
    类型:Boolean

    可选。 确定所移动的文本是否折叠。 默认值为 false。

  • Count
    类型:Int32

    可选。 表示要下移的页数。 默认值为 1。

备注

如果 Extend 的值是 true,则文本选择的有效的结尾时向下滚动一页的 Count 数字。 否则,文本选定内容折叠和定位 Count 向下翻页从活动的结束。 若在 Count 页之前到达了文档结尾,就定位在文档结尾。

如果 Count 为负,则 PageDown 的执行方式类似于 PageUp 方法。

示例

Sub PageExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to first line in document and select it.
   objSel.GotoLine(1, True)
   objSel.PageDown(True, 2)
   objSel.PageUp(True, 2)
End Sub

.NET Framework 安全性

请参阅

参考

TextSelection 接口

EnvDTE 命名空间