Share via


TextSelection.EndOfLine 메서드

개체를 현재 줄의 끝으로 이동합니다.

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

구문

‘선언
Sub EndOfLine ( _
    Extend As Boolean _
)
void EndOfLine(
    bool Extend
)
void EndOfLine(
    [InAttribute] bool Extend
)
abstract EndOfLine : 
        Extend:bool -> unit
function EndOfLine(
    Extend : boolean
)

매개 변수

  • Extend
    형식: Boolean

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

설명

경우 Extend 는 true, 선택한 텍스트의 활성 끝만 이동 합니다. 그렇지 않으면 선택한 축소와 문서의 끝에 배치 합니다.

예제

Sub EndOfLineExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   Dim objActive As VirtualPoint = objSel.ActivePoint
   ' Collapse the selection to the beginning of the line.
   objSel.StartOfLine()
   ' objActive is "live", tied to the position of the actual selection, 
   ' so it will reflect the new position.
   Dim iCol As Long = objActive.DisplayColumn
   ' Move the selection to the end of the line.
   objSel.EndOfLine()

   MsgBox("The length of the insertion point line is " & (objActive.DisplayColumn - iCol) & " display characters.")
End Sub

.NET Framework 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스