TextSelection.LineDown 方法

更新:2007 年 11 月

将文本选择的插入点按指定的行数下移。

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

语法

声明
Sub LineDown ( _
    Extend As Boolean, _
    Count As Integer _
)
用法
Dim instance As TextSelection
Dim Extend As Boolean
Dim Count As Integer

instance.LineDown(Extend, Count)
void LineDown(
    bool Extend,
    int Count
)
void LineDown(
    [InAttribute] bool Extend, 
    [InAttribute] int Count
)
function LineDown(
    Extend : boolean, 
    Count : int
)

参数

  • Extend
    类型:System.Boolean

    可选。确定是否突出显示插入点在其中移动的行。默认值为 false。

  • Count
    类型:System.Int32

    可选。指示将插入点下移的行数。默认值为 1。

备注

LineDown 将选定文本的插入点从其当前位置上移 Count 行。如果 Extend 为 true,那么移动插入点后将突出显示新行。如果在 Count 行前到达文档开头,则定位在文档开头。

LineDown 尝试将显示列从原始行匹配到目标行,并且如果结束位置位于目标行中某制表符的中间,在必要时,它将舍去一个字符位置。

如果 Count 的值为负,则 LineDown 的执行类似于 LineUp 方法。

示例

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

权限

另请参见

参考

TextSelection 接口

TextSelection 成员

EnvDTE 命名空间