VirtualPoint VirtualPoint VirtualPoint Interface


Allows you to manipulate text beyond the right margin (left margin in bidirectional Windows) of the text document.

public interface VirtualPoint : EnvDTE.TextPoint
type VirtualPoint = interface
    interface TextPoint
Public Interface VirtualPoint
Implements TextPoint


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.  
   ' 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.  

   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  


VirtualPoint objects are similar to the TextPoint object except that they can query virtual space in a document. VirtualPoint objects are returned by TextSelection.StartPoint and TextSelection.EndPoint.

Virtual space is the empty space to the right of existing lines of text, and virtual points exist in this area.


AbsoluteCharOffset AbsoluteCharOffset AbsoluteCharOffset

Gets the one-based character offset from the beginning of the document to the object.

AtEndOfDocument AtEndOfDocument AtEndOfDocument

Returns true if the object is at the end of the document.

AtEndOfLine AtEndOfLine AtEndOfLine

Returns true if the object is at the end of a line.

AtStartOfDocument AtStartOfDocument AtStartOfDocument

Returns true if the object is at the beginning of the document.

AtStartOfLine AtStartOfLine AtStartOfLine

Returns true if the object is at the beginning of a line.

CodeElement[vsCMElement] CodeElement[vsCMElement] CodeElement[vsCMElement]

Returns the code element at the VirtualPoint location.

DisplayColumn DisplayColumn DisplayColumn

Gets the number of the current displayed column containing the object.


Gets the top-level extensibility object.

Line Line Line

Gets the line number of the object.

LineCharOffset LineCharOffset LineCharOffset

Gets the character offset of the object.

LineLength LineLength LineLength

Gets the number of characters in a line containing the object, excluding the new line character.

Parent Parent Parent

Gets the immediate parent object of a VirtualPoint object.

VirtualCharOffset VirtualCharOffset VirtualCharOffset

Gets the column index of a virtual point in virtual space.

VirtualDisplayColumn VirtualDisplayColumn VirtualDisplayColumn

Gets the display column of the current position.


CreateEditPoint() CreateEditPoint() CreateEditPoint()

Creates and returns an EditPoint object at the location of the calling object.

EqualTo(TextPoint) EqualTo(TextPoint) EqualTo(TextPoint)

Returns whether the value of the given TextPoint object's AbsoluteCharOffset property is equal to that of the calling VirtualPoint object.

GreaterThan(TextPoint) GreaterThan(TextPoint) GreaterThan(TextPoint)

Returns whether the value of the calling object's AbsoluteCharOffset property is greater than that of the given point object.

LessThan(TextPoint) LessThan(TextPoint) LessThan(TextPoint)

Returns whether the value of the called object's AbsoluteCharOffset property is less than that of the given object.

TryToShow(vsPaneShowHow, Object) TryToShow(vsPaneShowHow, Object) TryToShow(vsPaneShowHow, Object)

Attempts to display the text point's location.

Applies to