다음을 통해 공유


TextSelection.MoveToAbsoluteOffset 메서드

활성 지점을 지정한 1부터 시작하는 절대 문자 오프셋으로 이동합니다.

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

구문

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

매개 변수

  • Offset
    형식: Int32

    필수 요소. 문서의 처음에서 1부터 시작하는 문자 인덱스입니다.

  • Extend
    형식: Boolean

    선택적 요소. 기본값은 false입니다. 현재 선택을 확장하는 부울값입니다. Extend가 true이면 선택 영역의 활성 끝이 해당 위치로 이동하고 앵커 끝은 현재 위치를 유지합니다. 그렇지 않으면 양 끝은 지정한 위치로 옮겨집니다. 이 인수는 TextSelection 개체에만 적용됩니다.

예제

Sub MoveToAbsoluteOffsetExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to first line in document and select it.
   objSel.GotoLine(1, True)
   ' Move to various lines and offsets (character columns).
   objSel.MoveToAbsoluteOffset(3, True)
   objSel.MoveToDisplayColumn(3, True)
End Sub

.NET Framework 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스