Hi,
I added a checkbox and then some code after to set the checkbox.isOn to true. It prints that status but the checkbox is not actually checked. How would I get it to show checked by code? I am loading a data file and based on some data I need to have it checked.
Thanks!
local lblSaveEmail = display.newText("Remember Email Address", 50, 335, native.systemFont, 16) lblSaveEmail:setTextColor(255, 255, 255) group:insert( lblSaveEmail ) local chkSavePWord = widget.newSwitch { left = 10, top = 370, style = "checkbox", id = "Checkbox button2", initialSwitchState = false, onPress = chkSavePWordListener, } group:insert( chkSaveEmail ) local lblSavePWord = display.newText("Remember Password", 50, 375, native.systemFont, 16) lblSavePWord:setTextColor(255, 255, 255) group:insert( lblSavePWord ) local btnLogin = widget.newButton { left = 50, top = 420, label = "Login", id = "button\_1", onEvent = onbtnLoginButtonEvent, } group:insert( btnLogin ) chkSaveEmail.isOn = true print(chkSaveEmail.isOn)