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

XPMenus: changing main menu

Thread ID:

Created:

Updated:

Platform:

Replies:

37250 Nov 17,2005 08:35 PM UTC Nov 22,2005 10:18 AM UTC WinForms 3
loading
Tags: Tools
Jim
Asked On November 17, 2005 08:35 PM UTC

Is there an easy way to change at runtime which bar MainFrameBarManager treats as the main menu? I would like to construct a couple of menus and change them. MainMenuBar is a read-only property.

Mano J [Syncfusion]
Replied On November 18, 2005 09:57 AM UTC

Hi Jim, You could use BarStyle property to change bar''s MainMenu. Say, if bar1 is the Main bar and bar2 is another bar, then you could change the bar2 to MainMenu as follows, // Set bar2 as Main menu this.bar2.BarStyle = BarStyle.IsMainMenu ; this.bar1.BarStyle = BarStyle.Visible; // Set the RowIndex of MainMenu to zero. this.mainFrameBarManager1.GetBarControl(this.bar2).RowIndex = 0; this.mainFrameBarManager1.GetBarControl(this.bar1).RowIndex = 2; Please let me know if you have any questions. Regards, Mano

Jim
Replied On November 21, 2005 02:52 AM UTC

Couldn''t get this to work. I want to hide on menu and show another. As you know, I''m giving up on XPMenus and going with a competitor''s product anyway. Thanks for trying to help.

Mano J [Syncfusion]
Replied On November 22, 2005 10:18 AM UTC

Hi Jim, If you want to make a bar as a MainMenu and hide all other menus, you should associate the BarStyle of the bar to MainMenu and set the BarStyle of other menus to be none. private void button1_Click(object sender, System.EventArgs e) { this.bar1.BarStyle = BarStyle.None; this.bar2.BarStyle = BarStyle.IsMainMenu; } private void button2_Click(object sender, System.EventArgs e) { this.bar2.BarStyle = BarStyle.None; this.bar1.BarStyle = BarStyle.IsMainMenu; } Please let me know if this meets your requirements. I have attached a sample that illustrates this issue. Regards, Mano Sample.zip

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

;