Entry:onClick(x, y) event


This event is fired when the user has clicked on the Entry.

Parameters

x

The horizontal position of the mouse in the Entry area.

y

The vertical position of the mouse in the Entry area.

Return value

The event returns no value.

Example

local ui = require "ui" -- create a window local win = ui.Window("Entry:onClick() sample", 400, 300) win:status("Click on the Entry !") local entry = ui.Entry(win, "Entry") entry:center() -- set a onClick() event function entry:onClick(x, y) win:status("Good Job ! You have clicked at position "..x..", "..y) end win:show() while win.visible do ui.update() end