Groupbox:onClick(x, y) event


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

Parameters

x

The horizontal position of the mouse in the Groupbox area.

y

The vertical position of the mouse in the Groupbox area.

Return value

The event returns no value.

Example

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