Export (0) Print
Expand All
ID
Top
Expand Minimize

DisplayColumn Property (General Extensibility)

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public ReadOnly Property DisplayColumn() As Long
[Visual Basic 6]
Property Get DisplayColumn() As Long
[C++]
HRESULT __stdcall get_DisplayColumn(
   /* [out, retval] */ long* retVal
);
[C#]
int DisplayColumn {get;}
[JScript .NET]
public function get DisplayColumn() : int

Remarks

The column numbering starts at one. The display column may be different from the value of the LineCharOffset Property (General Extensibility) if the line contains tab characters. DisplayColumn uses the global setting for tab size to determine the displayed column.

Example

Sub DisplayColumnExample()
   Dim objTextDoc As TextDocument
   Dim objTP As TextPoint, iCtr As Integer
   Dim msg As String

   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")

   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objTP = objTextDoc.StartPoint.CreateEditPoint

   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objTP.Insert("This is a test." & Chr(13))
   Next iCtr

   ' Capitalize the third word of the second line
   objTP.StartOfDocument()
   msg = "DisplayColumn value: " & objTP.DisplayColumn & vbCr
   msg = msg & "Line value: " & objTP.Line & vbCr
   msg = msg & "LineCharOffset value: " & objTP.LineCharOffset & vbCr
   msg = msg & "LineLength value: " & objTP.LineLength & vbCr
   MsgBox(msg)
End Sub

See Also

Applies To: EditPoint Object | TextPoint Object | VirtualPoint Object

Show:
© 2014 Microsoft