I need to change my widget.newButton’s image after taping on to indicate whether or not a selection was correct or incorrect…
Example :
myBtn = widget.newButton{ id = "myBtn", left = 255, top = 58, width = 44, height = 44, default = "image1.png", over = "image2.png", onEvent = onBtn } -- trying to change image after tap. local onBtn = function( event ) if (event.target.id == "Y" ) then print("Correct....") myBtn.default = "correct.png" NextQuestion(appGlobals.CurrentQuestion); else print("Wrong....") myBtn.default = "wrong.png" end end