List:onLeave() event


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

Return value

This event returns no value.

Example

local ui = require "ui" -- creates a simple window local win = ui.Window("List:onHover() event sample", 320, 260) local list = ui.List(win, {"ListItem 1", "ListItem 2", "ListItem 3"}, 120, 60) -- List:onHover event function list:onHover() win:status("You are hovering the List Widget") end -- List:onLeave event function list:onLeave() win:status("The List Widget is no longer hovered") end win:status("") win:show() -- update window while win.visible do ui.update() end