다음을 통해 공유


EditPoint.WordLeft 메서드

개체를 지정한 단어 수만큼 왼쪽으로 이동합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub WordLeft ( _
    Count As Integer _
)
void WordLeft(
    int Count
)
void WordLeft(
    [InAttribute] int Count
)
abstract WordLeft : 
        Count:int -> unit
function WordLeft(
    Count : int
)

매개 변수

  • Count
    형식: Int32

    선택적 요소. 편집 지점을 버퍼의 현재 위치에서 왼쪽으로 몇 단어 이동할 것인지 지정합니다.

설명

WordLeft는 지정한 단어 수만큼 편집 지점을 왼쪽으로 이동합니다. 지정한 Count 단어 수만큼 이동하던 중 문서의 시작에 도달하면 편집 지점은 문서의 시작 부분에 머무릅니다.

이 인수가 음수이면 WordLeft가 WordRight와 비슷하게 수행됩니다.

예제

Sub WordLeftExample()
   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
       
   ' Replace the eighth word on the third line with a new word.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Delete(4)
   objEditPt.Insert("raid")
   objEditPt.WordLeft(3)
End Sub

.NET Framework 보안

참고 항목

참조

EditPoint 인터페이스

EnvDTE 네임스페이스