Is it possible to add an entirely new menu, say menu "CustomApp" on the fly?
For example a CustomApp package could add its own menu "CustomApp" with submenus, ect, once Needed.
Former examples I have seen, only dealt with adding to an existing menu.
Is it possible to add an entirely new menu, say menu "CustomApp" on the fly?
For example a CustomApp package could add its own menu "CustomApp" with submenus, ect, once Needed.
Former examples I have seen, only dealt with adding to an existing menu.
You can't add an entirely new menu using AddMenuCommands. We have it from John Fultz here:
"AddMenuCommands can only position a menu relative to one with a simple front end token."
(I trust I've not taken that out of context.)
FrontEnd`ResetMenusPacket
– b3m2a1
Aug 27 '18 at 10:51
You can change the Mathematica menu in the way you desire by editing the MenuSetup.tr file, and restarting Mathematica. I make this change each time I get a new version of Mathematica.
Of course, this isn't ideal, because it involves making a permanent change to the system, but it does work - just follow the style of the rest of the file.
Be careful to back up the original file, and make your changes a little at a time, because Mathematica isn't very informative if you get the syntax wrong. Don't use operators in this file - last time I tried, they failed.