DockWindow - Menu Merge

Bars for Windows Forms Forum

Posted 14 years ago by Corey Miller
Avatar
Perhaps this goes along with a previous topic about docking menus and toolbars... I dont actually know. I have gotten the DockWindow working appropriately; however, forms that are mdi children and are placed into the dockwindow are not merging their main menu like they are supposed to. Is this a known issue? Is there something additionally I need to do to get that feature? Am I doing something wrong.

Here is my code...

            TC.CodeEditor.frmCodeEditor oForm = new TC.CodeEditor.frmCodeEditor();
            ActiproSoftware.UIStudio.Dock.DocumentWindow oDoc = new ActiproSoftware.UIStudio.Dock.DocumentWindow();
            oDoc.DockManager = this.AP_dockManager;
            oDoc.Text = oForm.Text;
            oForm.TopLevel = false;
            oForm.Visible = true;
            oForm.FormBorderStyle = FormBorderStyle.None;
            oForm.Dock = DockStyle.Fill;
            oDoc.Controls.Add(oForm);
            oDoc.Activate(true);
The oForm has a 2.0 MainMenu attached to it that merges with the main menu. But when I run this command the main menu is within the tabbed document window and never merges with the main menu of the mdi parent.

Comments (3)

Posted 14 years ago by Corey Miller
Avatar
Further testing has resulted in a merge only when the mdi setting is standard and not tabbed. With that I am guessing you are not allowing the mdi tabbed to do a menu merge... is this correct?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Corey,

We're not preventing anything in this case. It's that Microsoft's code (which is all internal in the framework or in the Windows core) only automatically merges menus when MDI child forms are in a parent form. Since "tabbed MDI" doesn't use MDI child forms, no merging takes place. However you should be able to work around that by manually merging. I believe all the menu/toolbar controls have methods you can call to do that. At least I know the new .NET 2.0 toolstrip controls do.

We're making great progress on our own set of bar controls for UIStudio and want that to be a core feature that works no matter what MDI mode you use.


Actipro Software Support

Posted 14 years ago by Corey Miller
Avatar
Perhaps a better solution is to convert your DocumentWindow concept into the standard child MDI form. It seems to be the most logical.
The latest build of this product (v2020.1 build 0400) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.