From Xojo Documentation

Revision as of 18:11, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As MenuBar )
aDesktopApplication.MenuBar = newMenuBarValue
MenuBarValue = aDesktopApplication.MenuBar

New in 2021r3

Supported for all project types and targets.

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


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, DesktopWindow.MenuBar property