Entry:cut() method
Cut the current Entry text to 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:cut() 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)
local button = ui.Button(win, "Cut text", entry.x + entry.width + 8, entry.y-4)
function button:onClick()
ui.info("You have cut '"..entry.text.."' to the clipboard")
entry:cut()
end
win:show()
-- update user interface
repeat
ui.update()
until not win.visible