次の方法で共有


LanguageService.OnCaretMoved Method

Definition

Called when the caret has moved.

public:
 virtual void OnCaretMoved(Microsoft::VisualStudio::Package::CodeWindowManager ^ mgr, Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ textView, int line, int col);
 virtual void OnCaretMoved(Microsoft::VisualStudio::Package::CodeWindowManager const & mgr, Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & textView, int line, int col);
public virtual void OnCaretMoved (Microsoft.VisualStudio.Package.CodeWindowManager mgr, Microsoft.VisualStudio.TextManager.Interop.IVsTextView textView, int line, int col);
abstract member OnCaretMoved : Microsoft.VisualStudio.Package.CodeWindowManager * Microsoft.VisualStudio.TextManager.Interop.IVsTextView * int * int -> unit
override this.OnCaretMoved : Microsoft.VisualStudio.Package.CodeWindowManager * Microsoft.VisualStudio.TextManager.Interop.IVsTextView * int * int -> unit
Public Overridable Sub OnCaretMoved (mgr As CodeWindowManager, textView As IVsTextView, line As Integer, col As Integer)

Parameters

mgr
CodeWindowManager

[in] The CodeWindowManager object controlling the code window that the caret moved in.

textView
IVsTextView

[in] The IVsTextView object that holds the view of the source file.

line
Int32

[in] The new line the caret is on.

col
Int32

[in] the new column the caret is on.

Remarks

If you want to do anything special when the caret is moved, you must derive a class from the LanguageService class and implement this method. Be sure to call the base class version of this method either before or after your specific needs.

The base method calls the internal TypeAndMemberDropdownBars.SynchronizeDropdowns method if a drop-down bar has been added to the text view. TypeAndMemberDropdownBars.SynchronizeDropdowns calls the virtual method, OnSynchronizeDropdowns, and then refreshes the combo-boxes.

Applies to