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

changing menus and toolbars with xpMenus component

Hello, I am a ''trial'' user and will probably buy the product, but it seems there is on class reference included, so I don''t know the syncfusion framework enough to know how to do this, can I do this? I''m am using xpMenus components. I have a MainMenu and a Toolbar together. I noticed you can create additional toolbars and maybe menus? My hope was that I could have 2 menus and 2 toolbars. When the form containing the xpmenu (menu and toolbar) is opened in Mode A, then MainMenu1 and Toolbar1 is used, when the form is opened in ''Mode B'', then MainMenu2 and Toolbar2 are used. How do you specify what the current Main menu should be? Maybe something like: // perhaps in load event of mainform //short cut ref XPMenus.MainFrameBarManager mfm = myMainFrameBarManager; if (_Mode = Mode.ListMode) { mfm.MainMenu.Visible = false; mfm.MainMenu = mfm.Items["MainMenu2"]; // makes current mainmenu mfm.MainMenu.Visible = true; XPMenus.Bar tbar = mfm.GetToolBarByName ("MyToolbar"); tbar.Visible = false; tbar = mfm.GetToolBarByName("MyOtherToolbar"); tbar.Visible = true; } else { // already in Mode.ReportView // and have menu and toolbar set } thanks so much, sincerely, john scalco

2 Replies

SG Sean Greer July 22, 2004 07:44 PM UTC

John, It appears that you can change which bar is the main menu at runtime by changing the BarStyle of the two toolbars. Something like this: this.bar1.BarStyle &= ~BarStyle.IsMainMenu; this.bar1.Manager.GetBarControl(this.bar1).Hide(); this.bar2.BarStyle |= BarStyle.IsMainMenu; Hope that helps, Sean


AD Administrator Syncfusion Team July 23, 2004 10:26 AM UTC

Hi, Thanks a lot for the update, Sean. John, please refer to your DirectTrac incident 12557 for my update in this regard. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Up arrow icon