IEditorOperations::MoveCaret Method (ITextViewLine^, Double, Boolean)

 

Moves the caret to the given line at the given offset.

Namespace:   Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

void MoveCaret(
	ITextViewLine^ textLine,
	double horizontalOffset,
	bool extendSelection
)

Parameters

textLine
Type: Microsoft.VisualStudio.Text.Formatting::ITextViewLine^

The ITextViewLine on which to place the caret.

horizontalOffset
Type: System::Double

The horizontal location in the given textLine to which to move the caret.

extendSelection
Type: System::Boolean

If true, the selection is extended when the caret is moved; if false, the selection is not extended.

Exception Condition
ArgumentNullException

textLine is null.

Return to top
Show: