Propriedade VirtualPoint.VirtualCharOffset

Obtém o índice da coluna de um ponto virtual no espaço virtual.

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

Sintaxe

'Declaração
ReadOnly Property VirtualCharOffset As Integer
    Get
int VirtualCharOffset { get; }
property int VirtualCharOffset {
    int get ();
}
abstract VirtualCharOffset : int
function get VirtualCharOffset () : int

Valor de propriedade

Tipo: System.Int32
Um valor inteiro indicando o índice da coluna de um ponto virtual no espaço virtual.

Comentários

Caractere de numeração começa em um. VirtualCharOffsetRetorna o número de caracteres que o ponto de virtual está do lado esquerdo de uma linha no documento.

Exemplos

Sub VirtualPointExample()
   ' 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.")
   MsgBox("VirtualCharOffset value: " & objActive.VirtualCharOffset & vbCr & "VirtualDisplayColumn value: " & objActive.VirtualDisplayColumn)
End Sub

Segurança do .NET Framework

Consulte também

Referência

VirtualPoint Interface

Namespace EnvDTE