Share via


ViewFilter.OnSetFocus(IVsTextView) Method

Definition

Called when the specified view gains focus.

public:
 virtual void OnSetFocus(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ view);
public:
 virtual void OnSetFocus(Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ view);
 virtual void OnSetFocus(Microsoft::VisualStudio::TextManager::Interop::IVsTextView const & view);
public virtual void OnSetFocus (Microsoft.VisualStudio.TextManager.Interop.IVsTextView view);
abstract member OnSetFocus : Microsoft.VisualStudio.TextManager.Interop.IVsTextView -> unit
override this.OnSetFocus : Microsoft.VisualStudio.TextManager.Interop.IVsTextView -> unit
Public Overridable Sub OnSetFocus (view As IVsTextView)

Parameters

view
IVsTextView

[in] An IVsTextView object representing the view that has received the focus.

Implements

Remarks

If your language service needs to respond to a view gaining focus, then you must derive a class from the ViewFilter class and override this method.

This method is an implementation of the OnSetFocus method on the IVsTextViewEvents interface.

The base method calls the OnSetFocus method on the CodeWindowManager object passed to the ViewFilter class constructor (which means you can override the CodeWindowManager class's version of the method if you otherwise do not need to override any method in the ViewFilter class). The base method then calls the OnActiveViewChanged method.

Applies to