Hi,
I am using widget buttons to create a small user text input. When the user clicks the widget it adds a letter to the input field. I am only wanting the user to be able to click the widget once and then it is removed but removed in a way that it can be easily put back in place if the user cancels his input field to start again.
Heres the code, it works perfectly adding the letter to the input field but as I said I want to easily remove and reinstate it:
local sButton = widget.newButton
{
cornerRadius = 4,
onEvent =
function()
answerString.text = answerString.text…“S”
end,
id = “sButton1”,
label = “S”,
width = 60, height = 60,
fontSize = 30,
emboss = true,
font = “Pieces of Eight”
}
group:insert( sButton )
sButton.y = display.contentHeight * 1
any help would be greatly appreciated!!