ToolWindow.Activate with Focus

Docking/MDI for Windows Forms Forum

Posted 8 years ago by Lars Kjaersgaard
Version: 16.1.0330


After a process finishes in my application I want to show a tool window and have it gain focus in order to stay open until the user clicks elsewhere in the application. This tool window is in state AutoHide. When I call toolWindow.Activate(true), the tool windows does show, but the title bar of the tool window remains unselected and it autohides again after a few seconds.

In fact calling toolWindow.Activate(true), toolWindow.Activate(false) or tollWindow.Actrvate() all results in this behavior.

What am I missing?

As an aside, if I - as a user - hover over the tab of the autohidden tool window it will activate. If I then click inside the activated tool window, the titlebar of the tool window changes appearance to selected, and now the tool window will remain open until I click elsewhere. This is the behavior I want to achieve. 

[Modified 8 years ago]

Comments (2)

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Lars,

Calling ToolWindow.Activate(true) should be focusing the tool window or its contents.  When focused, you should see the tool window title bar show its "activated" state.  That works when testing from our sample project's View menu where we click on the Events menu item for instance.

Could it be that you have something else taking focus after you call Activate()?

Actipro Software Support

Posted 8 years ago by Lars Kjaersgaard

Of course I did!

Thx for pointing me in the right direction - and also for a kind and patient answer :-)

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.