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

How to allow customization in MainMenuBar ?

Hi, I attached my code for adding a test MainMenuBar. (C++.Net) The toolbar load correctly. At runtime, I can add items on mainbar but not in sub menu (like under file). How I can allow this customization ? Best regards, Martin

5 Replies

MB Martin Bonneville February 24, 2005 09:41 PM UTC

I can''t add my file (1k size) ... a message appear saying "File size need to be < 2048k" ! Then, here''s my code : Bar* bar = new Bar(mainFrameBarManager, S"MainMenu"); bar->BarStyle = (BarStyle)(BarStyle::IsMainMenu | BarStyle::AllowQuickCustomizing | BarStyle::DrawDragBorder | BarStyle::RotateWhenVertical | BarStyle::Visible); mainFrameBarManager->Bars->Add(bar); ParentBarItem* parentBarItem = new ParentBarItem(); parentBarItem->Customizable = true; parentBarItem->CategoryIndex = 0; parentBarItem->ID = S"&File"; parentBarItem->Text = S"&File"; parentBarItem->Items->Add(m_Items->Item[0]); parentBarItem->Items->Add(m_Items->Item[1]); parentBarItem->SeparatorIndices->Add(__box(1)); bar->Items->Add(parentBarItem); Regards, Martin


AD Administrator Syncfusion Team February 24, 2005 10:06 PM UTC

Hi Martin, XPMenus should allow you to add BarItems to a ParentBarItem by default. If you drag the BarItem you want to add over the ParentBarItem, it''s menu should open. You can then drop the BarItem into it. This works almost exactly the same way as in the designer. Please let me know if you have any further questions. Regards, Gregory Austin Syncfusion Inc.


MB Martin Bonneville February 25, 2005 01:42 PM UTC

Hi Gregory, If I drag the BarItem I want to add over the ParentBarItem, it''s menu open. But I can''t then drop the BarItem into it. Regards, Martin


AD Administrator Syncfusion Team February 25, 2005 03:42 PM UTC

Hi Martin, Have you tried dragging the BarItem over the open menu and then dropping it? If not, I''d recommend trying it. Otherwise, could you send me a sample that demonstrates this problem so that I could investigate it? Thank you for your cooperation. Regards, Gregory Austin Syncfusion Inc.


MB Martin Bonneville February 25, 2005 04:44 PM UTC

Hi, I found my error, I need to add the ParentBarItem in MainFrameBarManager items. Not on ly in Bar items. Thank Regards, Martin

Loader.
Live Chat Icon For mobile
Up arrow icon