MenuItem.checked read/write

Get or set the MenuItem checked state, a boolean value.
When set to true, places a checked mark to the left of the Menu item text.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("MenuItem.checked sample", 316, 246) win.menu = ui.Menu() -- insert a new MenuItem "File" with a submenu local FileMenu = win.menu:insert(1, "File", ui.Menu("New", "Open", "Save", "Quit")).submenu -- disable FileMenu item "New" FileMenu.items[1].checked = false -- set a FileMenu onClick() event handler function FileMenu:onClick(item) if item.index == self.count then win.visible = false else ui.info("You have selected '"..item.text.."'") end end -- shows the Window win:show() -- update user interface repeat ui.update() until not win.visible