Assigning the nil value to this property will remove the main menu from the window
Window.menu read/write property
Get or set the main Menu of the Window.
Example
local ui = require "ui"
-- create a simple window
local win = ui.Window("Window.menu sample")
local button = ui.Button(win, "Suppress the main menu")
-- create the Window main menu
win.menu = ui.Menu("&File", "&Edit", "&View", "&?")
function button:onClick()
-- Remove the Window main menu
win.menu = nil
end
-- shows the Window
win:show()
-- update user interface
repeat
ui.update()
until not win.visible