Programatically creating a TabbedMdiContainer

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Simon Sprott
Version: 2.0.0109
Avatar
I need to dynamically create a new Tab Group (TabbedMdiContainer?).
I then need to be able to move documents between Tab Groups.

There are specific methods for this MoveToNewHorizontalTabbedMdiContainer, MoveToPreviousTabbedMdiContainer etc, but they don't give me very much control.

The post Dynamic TabbedMdiContainer implies this can be done, but has no details.

Any thoughts?

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Simon,

Correct, you can create new groups and then move to the next/previous groups via those methods but there isn't anything to let you jump directly to a group.

So if you had 2 vertical groups and you wanted to create a new document in a third. You'd call MoveToNewVerticalTabbedMdiContainer on the new document. Then figure out the index of that TabbedMdiContainer in the TabbedMdiRootContainer.TabbedMdiContainers collection. Then for other documents that need to move into that same container. Figure out which container index they are in the same way. Then by that data you'd know how many calls to MoveToNextTabbedMdiContainer or MoveToPreviousTabbedMdiContainer that you'd need to make to get the document into the container created by the new document.


Actipro Software Support

Posted 14 years ago by Simon Sprott
Avatar
This approach complicated the code abit, but seems to work.
Thanks for the help.
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.