Entry.masked read/write property
Get or set a boolean value, indicating wether the user input is visible or hidden by "*" characters.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Entry.masked sample", 320, 200)
local label = ui.Label(win, "Secret code : ", 60, 80)
local entry = ui.Entry(win, "0101111010101", label.x+label.width+10, label.y-4)
local button = ui.Button(win, "Show secret code", 110, 120)
function button:onClick()
entry.masked = not entry.masked
button.text = entry.masked and "Show secret code" or "Hide secret code"
end
-- mask the Entry
entry.masked = true
win:show()
-- entry:onClick() event (won't be fired !)
function entry:onClick()
ui.info("You have clicked on the Entry !!")
end
-- update user interface
repeat
ui.update()
until not win.visible