Bug with DockManager.FocusedToolWindow & tabbed toolwindows

Docking/MDI for Windows Forms Forum

Posted 10 years ago by Chien A.
Version: 2.0.0099
Platform: Services
Environment: Windows XP (32-bit)
A minor bug - when shifting from one tabbed toolwindow to another the DockManager.FocusedToolwindow property has not been properly updated to the newly focused Toolwindow by the time the WindowFocused event is fired.

This only occurs when shifting from one tabbed toolwindow to another...when shifting between docked toolwindows or between docked and tabbed/floating toolwindows, the FocusedToolwindow property has been updated to the newly focused window

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
We fire that event when the Enter event fires on a ToolWindow. The FocusedToolWindow iterates the tool windows and looks for which one contains the focus at the time it's called. For some reason in this scenario the .NET framework has fired the Enter event but the ContainsFocus method doesn't return the updated value yet when you call FocusedToolWindow.

I believe the WindowFocused event passes the window that caused it to fire, which should always be up-to-date. Maybe use that instead of DockManager.FocusedToolWindow.

Actipro Software Support

Posted 10 years ago by Chien A.
Thanks for the response. I'd already implemented a workaround using the event parameter as suggested - this is mainly just a heads-up :).
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.