Partilhar via


VsTextManagerClass.NavigateToPosition Method

Definition

Finds or creates an appropriate view on the specified buffer and puts the selection on the specified linear position.

public:
 virtual int NavigateToPosition(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, Guid % guidDocViewType, int iPos, int iLen) = Microsoft::VisualStudio::TextManager::Interop::IVsTextManager::NavigateToPosition;
public:
 virtual int NavigateToPosition(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, Guid % guidDocViewType, int iPos, int iLen);
public virtual int NavigateToPosition (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, ref Guid guidDocViewType, int iPos, int iLen);
abstract member NavigateToPosition : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * Guid * int * int -> int
override this.NavigateToPosition : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * Guid * int * int -> int
Public Overridable Function NavigateToPosition (pBuffer As IVsTextBuffer, ByRef guidDocViewType As Guid, iPos As Integer, iLen As Integer) As Integer

Parameters

pBuffer
IVsTextBuffer

[in] Pointer to the IVsTextBuffer interface.

guidDocViewType
Guid

[in] GUID identifying the view. This value should always be LOGVIEWID_TextView.

iPos
Int32

[in] Linear position in buffer on which to put the caret.

iLen
Int32

[in] Length of selection.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Applies to