Canvas:onHide() event


This event is fired when the Canvas is hidden (with a call to Canvas:hide() or setting the Canvas.visible property to false).

Return value

The event returns no value.

Example

local ui = require "ui" require "canvas" -- create a simple Canvas local win = ui.Window("Canvas:onHide sample", "fixed", 640, 480) local Canvas = ui.Canvas(win, 0, 50, 640, 430) function Canvas:onHide() ui.msg("Canvas Hidden") end local button = ui.Button(win, "Hide the Canvas widget") button:center() button.y = 10 function button:onClick() Canvas:hide() end ui.run(win):wait()