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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding bar items to a base form which aren''t showing in parent form

Thread ID:





24815 Feb 11,2005 01:46 AM UTC Feb 18,2005 12:20 AM UTC WinForms 7
Tags: Tools
Steve Bryant
Asked On February 11, 2005 01:46 AM UTC

I have a base form that has a bar manager. This bar manager is set to either a childFrame or mainFrame bar manager at runtime so form can be opened mdi or not. I''m adding new menu items to the base form which I would expect to be reflected in the subclassed form but they are not. Is there a way of getting these changes to show through to the subclassed forms without removing all controls from each form, changing form to inherit from Form and then changing them all back to inherit from the base form again? I was thinking AutoLoadToolbarPositions but I don''t think I can use this property as the barManager is not a MainFrameBarManager. Any ideas?

Administrator [Syncfusion]
Replied On February 11, 2005 07:45 PM UTC

Hi Steve, This sounds familiar to a known issue we have regarding inheritance in an MDI application, so I have a few questions for you. 1) Are you adding the new BarItems to the parent form in design time or runtime? 2) Are you deciding between the MainFrameBarManager and ChildFrameBarManager in the parent or the child? 3) What happens if you remove the XPMenu initialization code in the parent from InitializeComponent and put it in the constructor. Do the BarItems then show up during runtime? Thank you for your patience and cooperation as we investigate this matter. Regards, Gregory Austin Syncfusion, Inc.

Steve Bryant
Replied On February 13, 2005 07:23 PM UTC

Hi Gregory 1)My base form had several menu items on it (created in design time). I inherited from this form, and on this new form added more menu items (at desgin time). At this stage everything is fine, but then I want to go and add some additional menu items to the base form. I do this at design time, and the base form looks great but the new menu items added to the base form don''t show up in the inherited forms. 2)I''m deciding between the MainFrameBarManager and ChildFrameBarManager in the child. I set up the form using a ChildFrameBarManager, but then changed the declaration to a BarManager once I had everything set up (this is sort of as per your example to me posted after my initial question on 1/13 - XPMenus problem). 3)I''ve tried taking all the code from InitializeComponent and doing exactly the same thing in a constructor but I run into problems of not being able to add menu items at design time when I do this (the bars seem to become readonly). Steve

Steve Bryant
Replied On February 15, 2005 06:33 PM UTC

any sugestions Gregory?

Administrator [Syncfusion]
Replied On February 15, 2005 08:04 PM UTC

Hi Steve, Sorry for the delay. I''ve given this to the tech support engineer in charge of XPMenus and he''s taking a look at it. Regards, Gregory Austin Syncfusion Inc.

Administrator [Syncfusion]
Replied On February 15, 2005 11:29 PM UTC

Hi Steve, I have created a test sample as per your specifications and it seems to be working fine. Note that the Modifiers for the controls/BarItems/Bars added to the base form should be Protected or Public. Also the application needs to be rebuilt before these changes are visible in the derived form in the designer. Please refer to test sample attached and let me know if I have understood your requirements correctly. If not, kindly modify the sample to show the problem and send it back to us so that we could investigate this issue here. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Steve Bryant
Replied On February 17, 2005 09:15 PM UTC

Guru, I''ve sorted the issue out. The base class had 2 constructors, one default, the other took a parent form parameter and rebuilt the barManager as a MainFrameBarManager re-adding all items. The inheriting form must use this second base form constructor when opening the form in the designer. Thanks for taking the time to look into this for me. Rgds Steve

Administrator [Syncfusion]
Replied On February 18, 2005 12:20 AM UTC

Hi Steve, Thanks for the update. We are glad that this issue is resolved. Please feel free to contact us if you need any other information. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon