changes from white to red, and with deactivation (second click) the color of the text field changes back again fra red to white.
The text color, black, remains constant. It is like making an on/off switch to the backround color of the text field.
Michael H (Copenhagen DK)
Copy link to clipboard
As checkbox MouseUp event add this code:
this.getField("textfield 1").fillColor = event.target.value != "Off" ? color.red : color.white;
Many thanks for your solution. More than adequate to solve this problem. Excellent work.
This code changes the background color when checked but if you click on something else it goes transparent again even when checked. Is there a way to get it to stay the new color even when you click off of the field?
Thank you for any help in advance.
That should not be the case. Where did you place the code? Can you share the file in question?