Depending on the value of the GroupIndex property of menu items on the main menu, the merged menu items can replace menu items on the menu bar, or insert menu items into the menu bar. See GroupIndex for information on how to do these things.看帮助, 你需要设置 GroupIndex 就能达到是插入,还是取代原来的菜单
By default, all menu items in a menu bar (main menu) have the same GroupIndex value. To use GroupIndex to merge menus, set the GroupIndex value of each successive menu item to a value equal to or greater than that of the previous menu item.
menu1菜单中内容不见了
MainMenu : TMainMenu ; //主菜单
procedure InsertMenu(AMenu: TMainMenu; AIndex : Integer) ; //MainMenu.Items[AIndex]处插入AMenu菜单
end ;
-----InsertMenu里该怎么写?
设置GroupIndex后,合并一个MainMenu没问题,再次合并另一个MainMenu时就达不到目的了。