Tab:onClick(x, y) event
This event is fired when the user has clicked on the Tab.
Parameters
x
The horizontal position of the mouse in the Tab area.
y
The vertical position of the mouse in the Tab area.
Return value
The event returns no value.Example
local ui = require "ui"
-- create a window
local win = ui.Window("Tab:onClick() sample", 400, 300)
win:status("Click on the Tab !")
local tab = ui.Tab(win, {"Tab"})
tab:center()
-- set a onClick() event
function tab:onClick(x, y)
win:status("Good Job ! You have clicked at position "..x..", "..y)
end
win:show()
while win.visible do
ui.update()
end