Hi Bet,
We have a similar situation where a checkbox is red if blank and green if ticked. We set up a variable and then have an if statement:
var fld1 = xfa.resolveNode("form1.p4c.hazard1.ui.#checkButton.border.fill.color");
if (hazard1.rawValue == 1) {
fld1.value = "225,255,225";
}
else {
fld1.value = "255,225,225";
}
There are other variable, but I have just set out one above.
I think that you will be able to achieve what you are looking for if you access the ui.#checkButton.border.fill.color property using the xfa.resolveNode method.
Good luck,
Niall
ps instead of transparent, you could set the default colour of the checkbox the same at the background colour of the form/table. Then the mouse enter colour would be yellow and the mouse exit colour back to the default.
N.