Application.MenuBar

From Xojo Documentation

Property (As MenuBar )
aApplication.MenuBar = newMenuBarValue
or
MenuBarValue = aApplication.MenuBar

Supported for all project types and targets.

Represents the application’s global menubar. Its children are the menus.

Notes

The Application MenuBar is used by macOS when a Window does not have a specified MenuBar. It is also used by MDI applications on Windows to display the MDI window MenuBar.

The Application MenuBar property is not used by non-MDI Windows applications or Linux applications.

However, if the Application MenuBar property is specified, it will be automatically filled in as the MenuBar on any new Windows you create.

Sample Code

This line of code in the Open event of the App class sets the menubar to a user-created menubar. This can also be done in the Properties pane in the IDE.

App.MenuBar = MenuBar2

See Also

MenuItem, Window.MenuBar property