Share via


EditPoint.LineDown 方法

将编辑点下移指定的行数。

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

语法

声明
Sub LineDown ( _
    Count As Integer _
)
void LineDown(
    int Count
)
void LineDown(
    [InAttribute] int Count
)
abstract LineDown : 
        Count:int -> unit
function LineDown(
    Count : int
)

参数

  • Count
    类型:Int32

    可选。 编辑点移动的行数。 默认值为 1。

备注

如果在到达指定的行数之前就到达文档结尾,则编辑点停留在文档结尾。

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

示例

Sub LineDownExample()
   Dim objTextDoc As TextDocument
   Dim objEditPt As EditPoint, iCtr As Integer
        
   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")
       
   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
        
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objeditpt.Insert("This is a test." & Chr(13))
   Next iCtr
   objEditPt.StartOfDocument()
   objEditPt.LineDown(5)
End Sub

.NET Framework 安全性

请参阅

参考

EditPoint 接口

EnvDTE 命名空间