Edit:show() method


Show and activate the Edit (events can now be fired).

Return value

This function returns no value.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Edit:onShow() sample", "fixed", 340, 220) local button = ui.Button(win, "Click me", 10, 10) local edit = ui.Edit(win, "Showing this Edit for 3sec", button.x + button.width + 8, button.y) edit.visible = false -- set a onClick() event : shows the Edit function button:onClick(x, y) edit:show() end -- set a onShow() event : Hides the Edit after 3 seconds function edit:onShow() sleep(3000) edit:hide() end ui.run(win):wait()