LanguageService::OnCaretMoved Method (CodeWindowManager^, IVsTextView^, Int32, Int32)

 

Called when the caret has moved.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
virtual void OnCaretMoved(
	CodeWindowManager^ mgr,
	IVsTextView^ textView,
	int line,
	int col
)

Parameters

mgr
Type: Microsoft.VisualStudio.Package::CodeWindowManager^

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

textView
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

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

line
Type: System::Int32

[in] The new line the caret is on.

col
Type: System::Int32

[in] the new column the caret is on.

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.

Return to top
Show: