Share via


VirtualPoint.VirtualDisplayColumn Property

Gets the display column of the current position.

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

Syntax

'Declaration
ReadOnly Property VirtualDisplayColumn As Integer
'Usage
Dim instance As VirtualPoint 
Dim value As Integer 

value = instance.VirtualDisplayColumn
int VirtualDisplayColumn { get; }
property int VirtualDisplayColumn {
    int get ();
}
function get VirtualDisplayColumn () : int

Property Value

Type: System.Int32
An integer value indicating the display column of the current position.

Examples

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

.NET Framework Security

See Also

Reference

VirtualPoint Interface

VirtualPoint Members

EnvDTE Namespace