I attached my code for adding a test MainMenuBar.
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 ?
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);
ParentBarItem* parentBarItem = new ParentBarItem();
parentBarItem->Customizable = true;
parentBarItem->CategoryIndex = 0;
parentBarItem->ID = S"&File";
parentBarItem->Text = S"&File";
ADAdministrator Syncfusion Team February 24, 2005 05:06 PM
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.
MBMartin BonnevilleFebruary 25, 2005 08:42 AM
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.
ADAdministrator Syncfusion Team February 25, 2005 10:42 AM
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.
MBMartin BonnevilleFebruary 25, 2005 11:44 AM
I found my error, I need to add the ParentBarItem
in MainFrameBarManager items. Not on ly in Bar items.