Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Static
newStatic
defaultRemove a menu item from this menu.
Remove a menu item from this menu at the specified position.
Returns a list of menu items that has been added to this menu.
Retrieves the menu item matching the given identifier.
Popup this menu as a context menu on the specified window.
Optional
at: dpi.LogicalPosition | dpi.PhysicalPosition | PositionIf a position is provided, it is relative to the window's top-left corner. If there isn't one provided, the menu will pop up at the current location of the mouse.
Optional
window: WindowSets the window menu and returns the previous one.
Menu.setAsAppMenu
instead.Optional
window: Window
A type that is either a menu bar on the window on Windows and Linux or as a global menu in the menubar on macOS.
Platform-specific:
Menu
for the global menubar, it can only containSubmenu
s.