Partager via


TextSelection.PageUp Method

Moves the active point a specified number of pages up in the document, scrolling the view.

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

Syntax

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

Parameters

  • Extend
    Type: System.Boolean

    Optional. Determines whether the moved text is collapsed or not. The default is false.

  • Count
    Type: System.Int32

    Optional. Represents the number of pages to move up. The default value is 1.

Remarks

If the value of Extend is true, then the active end of the text selection is moved up Count number of pages. Otherwise, the text selection is collapsed and positioned Count pages up from the active end. If the beginning of the document is encountered before Count pages, then the position is left at the beginning of the document.

If Count is negative, then PageUp performs like the PageDown method.

Examples

Sub PageUpExample()
   ' 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 Security

See Also

Reference

TextSelection Interface

EnvDTE Namespace