Label:onClick() event


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

Return value

The event returns no value.

Example

local ui = require "ui" -- create a window local win = ui.Window("Label:onClick() sample", 320, 200) local label = ui.Label(win, "Click on this text !", 100, 75) -- set a onClick() event : change the label text property function label:onClick() label.text = "Good Job !" end win:show() while win.visible do ui.update() end