none
Toolwindow losing focus - event? RRS feed

  • Question

  • I've got a tool window in 2003 and I'd like to know when it loses focus, i.e. to know when its title goes from blue to white. OnLostFocus doesnt appear to work...

    I've dug around in the MitWin sample, and the OnSetFocus and OnKillFocus are correctly called as expected. However, when I put a OnGotFocus override in the MyToolWindow of the Managed Tool Window example, it never fires, while the OnLostFocus fires when it gets the focus (it appears).

    Jamie
    Monday, September 11, 2006 4:10 AM

Answers

  • I don't know about packages, but from add-ins you would do that with the EnvDTE.WindowEvents.WindowActivated and WindowClosing events.
    Monday, September 11, 2006 10:45 AM

All replies

  • I don't know about packages, but from add-ins you would do that with the EnvDTE.WindowEvents.WindowActivated and WindowClosing events.
    Monday, September 11, 2006 10:45 AM
  • WindowEvents does not have an event for lost focus. I suppose I can have the package track the focus and tell my tool window when its lost the focus.

    Unfortunately it wont tell me when the whole application loses focus. Any ideas for that?

    Jamie
    Monday, September 11, 2006 4:15 PM