Panel:onLeave() event


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

Return value

The event returns no value.

Example

local ui = require "ui" -- create a fixed Window local win = ui.Window("Panel:onLeave() event sample", "fixed", 320, 200) -- create a Panel local panel = ui.Panel(win, 0, 0, 100, 100) panel.bgcolor = 0xF0A000 panel.cursor = "cross" panel:center() function panel:onLeave() win:status("Mouse is outside Panel") end function panel:onHover(x, y) win:status("Mouse is inside Panel at "..x..", "..y) end win:status("") ui.run(win):wait()