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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Merging BarItems

Thread ID:

Created:

Updated:

Platform:

Replies:

41865 Mar 14,2006 07:24 AM UTC Mar 16,2006 05:46 AM UTC WinForms 8
loading
Tags: Tools
Terence Rossow
Asked On March 14, 2006 07:24 AM UTC

G''day, After testing out the menu merging in a test application (and having it work fine), I rewrote our mdi application to use this feature. Previously we had all menu items in the mdi parent form, and clicks would call functions in ActiveMdiParent. I moved all the menu items specific to child forms into our base child form, BaseForm. All our forms (except for the mdi parent) inherit from this BaseForm. However, when I fired up the application and opened some child forms, the menu merging did not work at all - no menu items or toolbars from the child forms were being shown in the toolbars of the mdi parent. I''ve been concentrating on the file menu for starters - both child and parent File menus have the same Text, same ID and same MergeOrder. I have tried them the parent MergeType as MergeItems and the child MergeType as Add, and vice versa - as well as both MergeTypes as Add and both as MergeItems. No luck. The fact that no even the toolbars are appearing (NO child toolbars, not just those that are shared with the mdi parent) leads me to believe that I have set something up wrong, but I''m not sure what. I am using the MFC style of updating menu bar item enabled properties - catching the UpdateUI event of each item, and setting the Enabled property. I don''t know if this has any bearing on the situation. Any assistance would be appreciated. TERRY ROSSOW

Mano J [Syncfusion]
Replied On March 14, 2006 04:08 PM UTC

Hi Terry, We regret for the inconvenience caused. I have tested this issue by creating a sample as per my understanding and for some reason, I was not able to reproduce the problem. In the sample, I have a mainform with some menus and toolBars and a BaseForm where I am using childFrameBarManager and create some menus and toolBars to merge with mdiparent form. Form3 is inherited from BaseForm and this child will be opened when new button is clicked in the mainform. At this point, the child form menus gets merged correctly with the mainform. Please let me know the version of Essential Studio you are using? I have the attached my test sample below. Please test this issue at your end and let me know if I have missed anything. Thanks for your patience and thanks for using Syncfusion products. Regards, Mano sample_menumerging_1.zip

Terence Rossow
Replied On March 14, 2006 10:52 PM UTC

Hi Mano, Your sample works fine for me (I also created a sample application that works fine, with inheritence before I started on our main app). I am using Syncfusion version 4.1.0.50, and visual studio 2005 - note that the sample application I created used these as well. Is there a simple thing that I could have done (some property setting or something) that would stop the menu merging? Or something that I should have done and did not? Cheers, TERRY ROSSOW

Terence Rossow
Replied On March 14, 2006 11:54 PM UTC

Hi Mano, I have fixed this particular problem, but in doing so, broke the fix for another problem we fixed a while back. Whenever a child form is opened or closed, the syncfusion toolbars all close and reopen, creating a nasty flickering look. We found that setting the MdiParent property prior to InitializeComponent stopped this. However, this was what was causing my menus to not merge. So, in order for the menus to work, we have to set the MdiParent after creating the form - however this causes a horrible flickering toolbar effect. If you have any suggestions on how to get rid of this flicker, I would be most grateful. Cheers, TERRY ROSSOW

Terence Rossow
Replied On March 15, 2006 05:08 AM UTC

Me again, Is there a standard way to handle the merge order of items that are to be used in toolbars, but that have different order in the toolbars to those in the menus? Eg, I have a MDI Parent with some menus, and a child with some menus - these are in the correct order when merged. However I now want to add a single toolbar to each that will be merged, and will use the same menu items as the menus, but the items will be in a different order on the toolbar to that which they appear in the menus. At the moment I''m trying to come up with a compromise by giving each item a merge order that works for both, but of course if in the menus one item comes before the other, it is not possible to switch the order in the toolbar. Any ideas? Thanks, TERRY ROSSOW

Mano J [Syncfusion]
Replied On March 15, 2006 12:55 PM UTC

Hi Terry, 1. Can you please try using the MainFrameBarManager''s LockHostedFormForMDIChanges property to reduce the flickering. this.mainFrameBarManager1.LockHostedFormForMDIChanges = true; ... ... Create MDI Child Form ... this.mainFrameBarManager1.LockHostedFormForMDIChanges = false; 2. For the re-ordering of menus, please have a look at the KB Article, Why is the ordering of the menu items in the main-menu bar different from the order set during design-time? Also, it is not possible to have separate merge order for the same BarItem in menus and toolBars in the current implementation of XPMenus Framework. Please let me know if this helps. Thank you for your cooperation. Regards, Mano

Terence Rossow
Replied On March 15, 2006 10:20 PM UTC

Hi Mano, Your suggestion of using LockHostedFormForMDIChanges helped - no longer do the toolbars flicker when opening forms. However it still happens when they are closed. It is unfortunate that separate merging is not possible for the menus. This will mean reordering the position of our toolbar items (which are already well established). Is there any plans to implement this in later Syncfusion releases? Cheers, TERRY ROSSOW

Mano J [Syncfusion]
Replied On March 16, 2006 04:30 AM UTC

Hi Terry, 1. You can also use the LockHostFormForMDIChanges in the child form''s closing event and closed event to reduce the flickering while closing child windows. private void Child_Closing(object sender, System.ComponentModel.CancelEventArgs e) { this.childFrameBarManager1.MainFrameBarManager.LockHostedFormForMDIChanges = true; } private void Child_Closed(object sender, System.EventArgs e) { this.childFrameBarManager1.MainFrameBarManager.LockHostedFormForMDIChanges = false; } <\code> 2. I have made a feature request # 831 for your requirement. Feature Request # 831 - Ability to have different Merging Order for same BarItem in menus and toolBars As I am unable to promise you any timeframe on implementing this feature, we will try our very best to fix this issue at the earliest and keep you informed. Please let me know if you have any questions. Regards, Mano

Terence Rossow
Replied On March 16, 2006 05:46 AM UTC

Hi Mano, Thank''s for your assistance, that suggestion worked fine. Cheers, TERRY ROSSOW

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;