Partilhar via


Método TextSelection.MoveToAbsoluteOffset

Move o ponto ativo ao caractere absoluto de dado deslocamento base 1.

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.dll)

Sintaxe

'Declaração
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
)

Parâmetros

  • Offset
    Tipo: Int32

    Obrigatório. Um índice de caractere o início do documento, começando em um

  • Extend
    Tipo: Boolean

    Opcional. Opção = false. Um valor Booleano para estender a seleção atual. Se Extend é true, então o final ativa de seleção move para o local quando o final de âncora permanecer onde ele. Se não, ambas as extremidades são movidas para o local especificado. Esse argumento só se aplica ao objeto de TextSelection .

Exemplos

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

Segurança do .NET Framework

Consulte também

Referência

TextSelection Interface

Namespace EnvDTE