Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Floating panel loses focus when menu pulled down

In the Docking Demo supplied with LMD DockingPack 2013, I notice that if you create a new document window and then make it floating, then you cannot access the application menu without the floating panel losing focus.

Steps to reproduce:

1. Launch the Docking Demo and select VS2010 style.
2. Invoke FILE>New Text File.
3. Drag the tab thus created to make it float as a separate window.
4. Click again on the FILE menu.

Expected result: The floating window remains focused with an orange caption (as in Visual Studio 2010).
Actual result: The floating window loses focus; the caption turns blue.

I get the same behaviour in my own application that uses LMD DockingPack. This is a serious problem for me because it means that none of the menu commands that operate on the focused control will work with floating windows. For example, I can't save the content of a floating window because when the Save command executes a different window now has focus.

How can I ensure that the floating window retains focus when I click on the main menu, as in Visual Studio 2010?


  • 4 Comments sorted by Votes Date Added
  • Posts: 0 Accepted Answer Vote Up0Vote Down

    This behavior does not related to Docking Pack. This is how VCL and standard Windows controlds (MENU) works. I'm sure that you will not be able to create a simple project with two standard forms, which works as you want.

    Visual Studio is based on WPF, which is quite different UI core; and its probably allow such tricks...

    Any way, I'll look what can be done here, but, as sayd, I'm almost sure, that nothing can be done even theoretically.
  • Thanks for looking.
    For me the important thing is the user's experience, so I don't care whether the floating form really has focus as long as it appears
    to the user as if it has focus. This could be as simple as an option or
    method to draw the caption in the focused colour even after the window
    has lost 'Windows focus'.
  • edited March 2014 Posts: 21Vote Up0Vote Down
    I've found an answer, which I wrote up here on Stack Overflow. As you suggested, the behaviour isn't specifically related to Docking Pack.

    This solution is simple, but as far as I know it works only with TActionMainMenuBar and TActionToolBar.
Sign In or Register to comment.