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
close icon

XP Menus merging

I have a MDI main form and a treeview as a docked control via the DockManager. Now I want the mdi main to have a menu and the treeview to have a menu and both should be merged to one. If I have a child form I can have a child menu which is merged with the main menu, but the cild form I can't dock with the docking manager, right? Is there any way for a non-form-derived class to have a child menu and to merge it in the main menu? Regards Peter

5 Replies

RP Ramesh Praveen Syncfusion Team April 21, 2003 12:56 PM UTC

Peter, You can associate menu and toolbar items with a TreeControl (or any other control) and then later "import" into into the Form's menu structure, via code. This attached sample shows you how this is done. Take a look at the sample.txt in the topmost folder. Regards, Praveen

PE Peter April 24, 2003 11:55 AM UTC

If I run your sample, I get a NullReferenceException in code "Me._bars.Add(mainMenuBar)" in the constructor of the BarItemsRepository class. How can I solve that problem?

RP Ramesh Praveen Syncfusion Team April 28, 2003 12:53 PM UTC

Hi, Could you please attach the whole exception here? Also the version you are testing this against and whether or not this is a licensed version. The code I attached was for the latest version we have, maybe you have an older version that's not compatible. Regards, Praveen

PE Peter April 29, 2003 04:28 AM UTC

Hi, I'm using Version and the evaluation copy of the tools. The whole exception info is placed below: + [System.NullReferenceException] {System.NullReferenceException} System.NullReferenceException Object {System.NullReferenceException} Object _COMPlusExceptionCode &HFFFFFFFFE0434F4D Integer _className Nothing String _exceptionMethod Nothing System.Reflection.MethodBase _exceptionMethodString Nothing String _message "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." String _innerException Nothing System.Exception _helpURL Nothing String + _stackTrace {System.Array} Object _stackTraceString Nothing String _remoteStackTraceString Nothing String _remoteStackIndex &H0 Integer _HResult &HFFFFFFFF80004003 Integer _source Nothing String _xptrs &H12F260 System.IntPtr _xcode &HFFFFFFFFC0000005 Integer Message "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." String InnerException Nothing System.Exception + TargetSite {System.Reflection.RuntimeMethodInfo} System.Reflection.MethodBase StackTrace " at Syncfusion.Windows.Forms.Tools.XPMenus.Bars.Add(Object value) at XPMenus_ImportingItems.BarItemsRepository..ctor(UserControlWithMenus parent) in E:\Projekte\Samples\MenuMerging\XPMenus_ImportingItems\VB\UserControlWithMenus.vb:line 152" String HelpLink "" String Source "Syncfusion.Tools" String HResult &HFFFFFFFF80004003 Integer

RP Ramesh Praveen Syncfusion Team April 30, 2003 12:00 PM UTC

Peter, This is a problem with the eval version. While our newer licensed versions have been fixed we don't have a newer eval version. So, you might have to wait till you purchase. Or a few more days before we update our eval. I would give it another 1 month for a new eval. Regards, Praveen

Live Chat Icon For mobile
Up arrow icon