VirtualPoint, interface

Mise à jour : novembre 2007

Vous permet de manipuler du texte au-delà de la marge droite (la marge gauche dans les plates-formes Windows bidirectionnelles) du document texte.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

<GuidAttribute("42320454-626C-4DD0-9ECB-357C4F1966D8")> _
Public Interface VirtualPoint _
    Implements TextPoint

Dim instance As VirtualPoint
[GuidAttribute("42320454-626C-4DD0-9ECB-357C4F1966D8")]
public interface VirtualPoint : TextPoint
[GuidAttribute(L"42320454-626C-4DD0-9ECB-357C4F1966D8")]
public interface class VirtualPoint : TextPoint
public interface VirtualPoint extends TextPoint

Notes

Les objets VirtualPoint sont semblables à l'objet TextPoint, mais ils peuvent interroger l'espace virtuel dans un document. Les objets VirtualPoint sont retournés par TextSelection.StartPoint et TextSelection.EndPoint.

L'espace virtuel désigne l'espace vide situé à droite des lignes de texte existantes, où se trouvent les points virtuels.

Exemples

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

Voir aussi

Référence

Membres VirtualPoint

EnvDTE, espace de noms