Share via


EditPoint.CharLeft 메서드

편집 지점을 지정한 문자 수만큼 왼쪽으로 이동합니다.

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

구문

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

매개 변수

  • Count
    형식: Int32

    선택적 요소. 왼쪽으로 이동할 문자 수입니다. 기본값은 1입니다.

설명

CharLeft는 지정한 문자 수만큼 편집 지점을 왼쪽으로 이동합니다. 지정한 문자 수만큼 이동하던 중 문서의 시작에 도달하면 커서는 문서의 시작에 머무릅니다. 편집 지점이 줄의 시작 부분에 있으면 CharLeft는 편집 지점을 앞 줄의 맨 끝에 둡니다. 즉, 모든 줄 바꿈 시퀀스는 단일 문자로 처리됩니다.

Count의 값이 음수이면 CharLeft가 CharRight 메서드와 동일하게 수행됩니다.

예제

Sub CharLeftExample()
   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
        
   ' Change the first letter of the fourth word of the fourth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.CharRight(2)
   objEditPt.CharLeft(2)
   objeditpt.Delete(1)
   objEditPt.Insert("p")
End Sub

.NET Framework 보안

참고 항목

참조

EditPoint 인터페이스

EnvDTE 네임스페이스