Bug with DockManager.FocusedToolWindow & tabbed toolwindows

Docking/MDI for Windows Forms Forum

Posted 16 years ago by Chien A.
Version: 2.0.99
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Avatar
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 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 16 years ago by Chien A.
Avatar
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 (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.