I just want to create TMenubar with bunch of submenu items. So I wrote my code like this.
TMenuBar and MenuItem2 added at design time.
for (int i = 1; i < 100; i++) {
TMenuItem *mainmenu = new TMenuItem(this);
mainmenu->Text = IntToStr(i);
mainmenu->StyleLookup = “menuitemstyle”;
MenuItem2->AddObject(mainmenu);
}
I got my output like this. As you can see I cannot see or navigate to top sub menus.
I tried to change every settings. But nothing worked.
I also noticed if I use the “TMainMenu” component, I can get my expected output like this.(used same code above). As per documentation “For Mac OS X applications, use the TMainMenu component:”
How do I archive 2nd Image result, but using “TMenuBar” component? Is it possible?
I used Rad Studio XE7. multi device form C++ builder. Application target for windows platform.