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

Problem with mdi main menu merging

The merging doesn't seem to work, unless i use RegisterMdiChildTypes. My mdi child has a default ctor, but it setup the menus in code.

5 Replies

AD Administrator Syncfusion Team March 11, 2003 06:46 PM UTC

Hi, Did you mean that you want merging to work without calling RegisterMdiChildTypes? That should work too. The mdi child constructor should initialize the menus. Make sure that you are following the rules for merging. The main-menus will be merged, the toolbars with the same name will be merged, etc. If possible, please attach a sample project here. Thanks Praveen Ramesh


DM Don More March 12, 2003 04:51 AM UTC

The sample project work as exspected - but if I comment out RegisterMdiChildTypes in form.cs the merging fails.


RP Ramesh Praveen Syncfusion Team March 13, 2003 06:50 PM UTC

Don, This is because you didn't call BeginInit/EndInit on the bar managers. Updating your BaseManager's Initialize like this fixes the problem: public void Initialize(Form form) { ((ISupportInitialize)m_barManager).BeginInit(); // Other stuff ((ISupportInitialize)m_barManager).EndInit(); } Regards, Praveen Ramesh


DM Don More March 14, 2003 07:11 AM UTC

Thanks for the quick response. I really like your support. The interface is named ISupportInitialize and not IRequiredInitialize ;)...It seems like I have to enclose *some* MainFrameBarManager initialization with BeginInit/EndInit to make the merging work as expected. Can I just ignore ISupportInitialize, and stick to RegisterMdiChildTypes ? The Essential Suite is IMHO one of the best tools today, and like all other tools, it's very designer centric. While this is absolutely necessary, I think it often means that the 'none designer mode' is not as good as it could be. This tend to make designer centric tools less suitable for applications, which are 'highly plugable' with extension assemblies or macros. Does this make sense ? I could be wrong of course, but I seriously doubt it ;)


RP Ramesh Praveen Syncfusion Team March 14, 2003 12:50 PM UTC

Don, You should be calling BeginInit/EndInit whether or not you use RegisterMdiChildTypes. It was our mandate to build the best designers for our componets, but the focus was defenitely not designer centric, which is why we store almost nothing in resource/xml files, etc. Regards, Praveen Ramesh

Loader.
Up arrow icon