다음을 통해 공유


TextSelection.CharLeft 메서드

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

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

구문

‘선언
Sub CharLeft ( _
    Extend As Boolean, _
    Count As Integer _
)
void CharLeft(
    bool Extend,
    int Count
)
void CharLeft(
    [InAttribute] bool Extend, 
    [InAttribute] int Count
)
abstract CharLeft : 
        Extend:bool * 
        Count:int -> unit
function CharLeft(
    Extend : boolean, 
    Count : int
)

매개 변수

  • Extend
    형식: Boolean

    선택적 요소. 이동된 텍스트가 축소되었는지 여부를 확인합니다. 기본값은 False입니다.

  • Count
    형식: Int32

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

설명

경우 Extend 는 True, 텍스트 선택 영역의 활성 끝 왼쪽으로 이동 Count 자. 그렇지 않으면 선택한 텍스트 축소 고 위치 Count 활성 끝의 왼쪽에 있는 문자입니다.

활성 끝을 Count에 지정된 문자 수만큼 이동하던 중 문서의 시작 부분을 만나면 위치는 문서의 시작 부분에 그대로 유지됩니다. 활성 끝이 줄의 시작 부분에 있으면 CharLeft는 활성 끝을 이전 줄의 끝에 유지합니다. 즉, 모든 줄 바꿈 시퀀스는 단일 문자로 처리됩니다.

Count가 음수이면 CharLeft가 CharRight처럼 동작합니다.

예제

Sub ChangeLeftExample()
   ' Open a document before running this example.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   objSel.StartOfDocument(True)
   objSel.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
   objSel.CharRight(True, 4)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsUppercase)
   MsgBox("Turned text uppercase.")
   objSel.CharLeft(False, 1)
   objSel.ChangeCase(vsCaseOptions.vsCaseOptionsLowercase)
   MsgBox("Turned text lowercase.")
End Sub

.NET Framework 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스