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.
Unfortunately, activation email could not send to your email. Please try again.

How to dynamically add sub-menus to the main XPMenu?

Thread ID:

Created:

Updated:

Platform:

Replies:

33764 Aug 25,2005 11:10 AM Jun 15,2006 12:14 PM Windows Forms 4
loading
Tags: Tools
do i have to
Asked On August 25, 2005 11:10 AM

Hi, We have Essential Suite 3.0.1. I''ve been unsuccessfully trying to dynamically add a top level menu item (with sub-items) to the main XPMenu and would appreciate some help. Here''s what I''ve tried so far: ParentBarItem customMenu = new ParentBarItem(); customMenu.CategoryIndex = 2; customMenu.Text = "Test"; customMenu.ID = "Test"; customMenu.Visible = true; // frameBarMgr - XPMenus.MainFrameBarManager frameBarMgr.Items.Add(customMenu); // menuBar - XPMenus.Bar menuBar.Items.Add(customMenu); My problem is that new top level item doesn''t show up at all. Any ideas why? Thanks in advance.

Administrator [Syncfusion]
Replied On August 26, 2005 11:38 AM

Hi Sergey, I have attached a sample that creates menus dynamically.Please refer to it and let me know if this meets your requirements.We appreciate your interest in Syncfusion products. Regards, Ebenezer.P DynamicMenus_3056.zip

Michael Scott
Replied On June 14, 2006 04:50 PM

What if the top level item is already there? For instance, Edit | View. I''ve got 3 items under Edit | View already, but I want to add a separator below those, then programatically add any number of pics after that separator. It may be 1, it may be 20. How would I do that, including the event handler for them? Michael >Hi Sergey, > >I have attached a sample that creates menus dynamically.Please refer to it and let me know if this meets your requirements.We appreciate your interest in Syncfusion products. > >Regards, >Ebenezer.P > > >DynamicMenus_3056.zip > >

J.Nagarajan [Syncfusion]
Replied On June 15, 2006 12:10 PM

Hi Michael, Yes,you can create a separator through programmatically using the following code this.parentBarItem2.BeginGroupAt(barItem7); I have attached a sample that demonstrate this completely.In this sample I have created 3 baritems already under Edit menu ,then programmatically added 3 baritems after a separator.Please refer to it and let me know if this meets your requirements.We appreciate your interest in Syncfusion products. Thank you, J.Nagaraj DynamicMenus.zip

J.Nagarajan [Syncfusion]
Replied On June 15, 2006 12:14 PM

Hi, Sorry for inconvenience caused.I have attached a wrong sample in the previous update.Here is the sample. F33764.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.

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.

;