When more than one G2 application is loaded simultaneously, and each can display a menu bar, the user typically needs a way to switch from one menu bar to another, and thus from one application to another. The Switch Menu Bar template, shown below, provides this capability.
![]() |
In general, every G2 application that uses a GMS menu bar and might be loaded along with another such application should provide the ability to switch menu bars by including a Switch Menu Bar template in its menu bar. Otherwise a user who enters the application by switching to its menu bar will not be able to leave conveniently.
Switching Menu Bars
The Switch Menu Bar template is a subclass of Dynamic Cascade template. When selected, the template calls a panel constructor that:
Gms-label) and the menu index (Gms-index) from the root template of each menu bar.
gms-display-menu-bar to display the menu bar in the window that displays the Switch Menu Bar template.
To include a Switch Menu Bar template in a menu specification:
Clone the Switch Menu Bar template from the GMS Palette and include it in the specification, as with any dynamic cascade template.