TextSelection.LineDown Method

Moves the insertion point of the text selection down the specified number of lines.

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

Syntax

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

Parameters

  • Extend
    Type: System.Boolean
    Optional. Determines whether the line in which the insertion point is moved is highlighted. The default is false.
  • Count
    Type: System.Int32
    Optional. Indicates how many lines down to move the insertion point. The default value is 1.

Remarks

LineDown moves the insertion point of the selected text up Count number of lines from its current position. If Extend is true, then the new line is highlighted after the insertion point is moved. If the beginning of the document is encountered before Count lines, then the position remains at the beginning of the document.

LineDown tries to match the display column from the line of origin to the target line, rounding down a character position, if necessary, if it ends up in the middle of a tab on the target line.

If the value of Count is negative, then LineDown performs like the LineUp method.

Examples

Sub LineUpExample()
   ' Before running this example, open a text document containing
   ' at least 5 lines of text.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to fourth line in document and then move down one line.
   objSel.GotoLine(4, False)
   objSel.LineDown(True, 1)
End Sub

.NET Framework Security

See Also

Reference

TextSelection Interface

EnvDTE Namespace