How to return floating document window to its original location in tabbed MDI container

Posted 2 months ago by Avatar John Brown


Our software uses a tabbed mdi container to hold document windows, and the tabs are in a particular order.

In version 12.1, you could right click on a tab and choose the Float command, which created a separate floating window containing the document. 

If you then right clicked on the floating window's toolbar and chose the Dock command, the document returned to the main mdi container, and its tab was placed back in the original position (where it was before it was floated).

We have recently upgraded to version 16.1, and the document tab's context menu items have changed.  There is still a Float command on the tab context menu in the main mdi container, and that creates a floating window with a tab for the document, which is good. 

Unfortunately, now, when you right-click on the tab in the floating window, there is no 'Dock' command.  If you choose the 'Move to Main Document Group' command (which seems to be the closest in functionality to the old 'dock' command), the document window is returned as a tab to the main mdi container, but the tab is added to the end of the list, not into its original place.

Many of our customers use the order of the documents to help drive their procedures, so the order is very important, and they're not happy with the 'new' functionality.

Is it possible to get the tab restored to its original tab order, like what happened in v12.1 ?

If so, how can it be done ?   

Update: I have just tested this in the sample browser of both versions, to make sure that the behaviour I'm seeing is built-in and not something we added ourselves, and the sample matches what our software does (in both versions).  Actually, the 16.1 sample returns the document tab to the start of the tab list when it's moved to the 'main document group' (and not the end, as I described above), but I think that's probably because we set the DockSite.AreNewTabsInsertedBeforeExistingTabs property to false.  I didn't test it to be certain, but the name of the property suggests that's the cause of the difference between our software and the sample.

Either way, that behaviour is not what we want.  We want it to return to its original place in the tab order, not the start or end.


[Modified 2 months ago]

Comments (7)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA

Hi John,

We've done a lot of work on Docking/MDI over the past few versions.  I'd recommend you try the 2018.1 version instead of the 2+ year old one you're using.  I tested this in the 2018.1 version and it seems to go back to its original container and tab order location, as you are wanting.

Actipro Software Support
Posted 2 months ago by John Brown

Thanks for the information.

Unfortunately, I don't think upgrading to 2018 is feasible at this time.   Our software suite is large and complex and uses Actipro features extensively, and I think it took about 6 months to upgrade from 2012 to 2016 (although I wasn't directly involved in that particular project).

I wonder if there's a way to simulate the functionality by us hooking in to the 'float' and 'dock' events/commands and remembering the original tab order of the document window then using that info to restore it to its original position when docking it again.

Would that be possible ?  

If so, can you point me towards the events, etc. that I could to use ?



Posted 2 months ago by John Brown

Hello again.

I decided to download and install the 2018 evaluation edition, to test whether the docking works as you said, and when I run the sample browser, it's crashing with a licensing error that says "The licensee or license key that was entered is invalid".  I would have thought that I don't need a license for the evaluation, so I don't know what to do.

Note that I do have a license for the 2016 version that our software is currently using installed on my computer.  Is it possible that that is causing confusion for the 2018 version ?

Any help you can provide would be appreciated :-)

Thanks again,

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA

Hi John,

I would expect that the 2018.1 version would work with your 2016.1 code.  I don't believe there are any breaking changes between those versions, only enhancements.

As for the evaluation license crash, that's really odd.  It shouldn't be happening.  If you write our support address and mention this thread, we can get some information from you and can give you instructions on how to fix it.

Actipro Software Support
Posted 2 months ago by John Brown

Thanks for the out-of-hours reply !

I will contact support and go from there.  Thanks.

Posted 2 months ago by John Brown

Support was able to help by giving me a new license key.  For some reason, the installer didn't save one into the registry.

I was then able to confirm that the 2018 Sample Browser shows the docking is now working how we'd like, which is good.

Unfortunately, there was a rewrite of the Editors and PropertyGrid in 2017, so just copying the 2018 dlls into our program folder didn't work.  I tried to update the references in some of our visual studio projects and rebuild so they used the new dlls, but they either didn't build or the program crashed when it ran.  I am not familiar with some of the projects with the problems, so I was unable to make the appropriate changes to fix them.

I think we'll have to plan for a proper upgrade to 2018, rather than just trying to cobble together a solution.

Thanks again for your time.

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA

Hi John,

The Editors and PropertyGrid did have some large updates in 2017.1, but the good news is that we still ship "legacy" copies of the assemblies, which are effectively the older codebase.  Please see the v2017.1 conversion topics for Editor/Grids in the documentation as the last sections in those topics tell you how to install those legacy assemblies (they don't install by default) and what they are.  That way you can still use the 2018.1 Docking/MDI and can swap in the legacy Editors/PropertyGrid assemblies so that there are no breaking changes.  Then once you have time, you can convert over to the newer Editors/Grids assemblies.

Actipro Software Support
Information The latest build of this product (2018.1 build 0674) was released 5 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.