TextSelection.EndOfDocument 메서드

개체를 문서의 끝으로 이동합니다.

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

구문

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

매개 변수

  • Extend
    형식: Boolean

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

설명

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

예제

Sub EndOfDocumentExample()
    ' Before running this example, open a text document.
    Dim objSel As TextSelection = DTE.ActiveDocument.Selection
    Dim objAnchor As VirtualPoint = objSel.AnchorPoint
    ' objAnchor is "live", tied to the position of the actual 
    ' selection, so it will reflect any changes. iCol and iRow are 
    ' created here to save a "snapshot" of the anchor point's position 
    ' at this time.
    Dim iCol As Long = objAnchor.DisplayColumn
    Dim iRow As Long = objAnchor.Line
    ' As the selection is extended, the active point moves but the 
    ' anchor point remains in place.
    objSel.StartOfDocument(True)
    objSel.EndOfDocument(True)

    If (iCol = objAnchor.DisplayColumn And iRow = objAnchor.Line) Then
        MsgBox("The anchor point has remained in place at row " & iRow & ", display column " & iCol)
    End If
End Sub

.NET Framework 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스