TextSelection.MoveToDisplayColumn(Int32, Int32, Boolean) Method

Definition

Moves the active point to the indicated display column.

void MoveToDisplayColumn(int Line, int Column, bool Extend = false);
[System.Runtime.InteropServices.DispId(58)]
public void MoveToDisplayColumn (int Line, int Column, bool Extend = false);
[<System.Runtime.InteropServices.DispId(58)>]
abstract member MoveToDisplayColumn : int * int * bool -> unit
Public Sub MoveToDisplayColumn (Line As Integer, Column As Integer, Optional Extend As Boolean = false)

Parameters

Line
Int32

Required. A vsGoToLineOptions constant representing the line offset, starting at one, from the beginning of the buffer.

Column
Int32

Required. Represents the virtual display column, starting at one, that is the new column location.

Extend
Boolean

Optional. Determines whether the moved text is collapsed or not. The default is false.

Attributes

Examples

Sub MoveToDisplayColumnExample()  
   ' Before running this example, open a text document.  
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection  
   ' Go to first line in document and select it.  
   objSel.GotoLine(1, True)  
   ' Move to various lines and offsets (character columns).  
   objSel.MoveToAbsoluteOffset(3, True)  
   objSel.MoveToDisplayColumn(3, True)  
End Sub  

Remarks

MoveToDisplayColumn moves the text selection to the specified line and column. If the column offset is in the middle of a tab character in the line, the active point is moved to the position immediately preceding the tab.

If the values of Line or Column are zero, then the active point remains at the current line number and/or column number.

Applies to