Entry:copy() method
Pastes the current Entry text from the clipboard.
Return value
This function returns no value.Example
local ui = require "ui"
-- create a fixed Window to hold the buttons
local win = ui.Window("Entry:paste() sample", "fixed", 320, 200)
local label = ui.Label(win, "Enter text : ", 25, 80)
local entry = ui.Entry(win, "", label.x + label.width + 8, label.y-4, 150)
local button = ui.Button(win, "Paste", entry.x + entry.width + 8, entry.y-4)
function button:onClick()
entry:paste()
end
win:show()
-- update user interface
repeat
ui.update()
-- enabled button only if clipboard is not empty
button.enabled = sys.clipboard and true or false
until not win.visible