We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Menus Merging

Hi, My application is not an mdi application. The container is not an mdi container but a simple panel. The main form use a MainFrameBarManager and the child forms use ChildFrameBarManager. I want to merge the menus & toolbars when a child form is shown and clear this menus when it closed. I want to obtain the behavior of an mdi application for merging. How can i do this ? Regards, Mikaël

3 Replies

AD Administrator Syncfusion Team June 16, 2005 10:38 PM UTC

Hi Mikael, Unfortunately the XPMenus framework does not support merging in anything but an MDI scenario. I''ve been told it''s possible to extend MainFrameBarManager to add the support, but it would be far easier to modify your application to use MDI than to modify MainFrameBarManager to modify your application. And even if you did, some situations might arise that we would be unable to correct. If you have any questions or require any clarification on this, please feel free to ask. Regards, Gregory Austin Syncfusion Inc.


MM Mikaël Morvan June 17, 2005 05:22 PM UTC

I use this code to merge menus & toolbars Bar oOriginalBar = BarManagerGetBarFromName(this.MainForm.BarManager, oBar.BarName); Bar oBarEq = this.MainForm.BarManager.GetMergedEquivalent(oOriginalBar, oOriginalBar); oBarEq.MergeItems(ChildForm.Bar); and this one to clean : this.MainForm.BarManager.RemoveReferencesToForeignItems(); The problem is the MainForm.BarManager.RemoveReferencesToForeignItems() method remove all the child form menus and toolbars (not only the menus and toolbars of the child form that is closing). When i close a child form, is there a way to clean only its menus & toolbars ? Regards, Mikaël


AD Administrator Syncfusion Team June 17, 2005 09:18 PM UTC

Hi Mikael, Unfortunately, this is one of those situations we can''t correct. MainFrameBarManager is designed to only handle merging with one child at a time (due to the nature of the MDI scenario). Because of this, it can''t tell the difference between removing a single child''s BarItems and multiple children''s BarItems. My recommendation would be to remerge with the still open children after closing a child and cleaning the Bar. Regards, Gregory Austin Syncfusion Inc.

Loader.
Up arrow icon