Tab:onHover() event


This event is fired when the user moves the mouse pointer over the Tab.

Parameters

x

The horizontal position of the mouse in the Tab area (zero means the left border of the widget).

y

The vertical position of the mouse in the Tab area (zero means the top border of the widget).

Return value

The event returns no value.

Example

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