Label:onContext() event


This event is fired when the user has clicked on the label with the right mouse button.

Return value

The event returns no value.

Example

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