Canvas:onLeave()event


This event is fired when the mouse cursor leaves the Canvas.

Return value

The event returns no value.

Example

--! luart-extensions import ui require "canvas" -- create a fixed Window local win = ui.Window("Canvas:onLeave() event sample", "fixed", 320, 200) win:status("") -- create a Canvas local canvas = ui.Canvas(win, 0, 0, 100, 100) canvas.cursor = "cross" canvas.bgcolor = 0xFFA0A0FF canvas:center() function canvas:onLeave() win:status("You leaved the Canvas") end await win:showasync()