mouseover and mouseexit

I’d like to have a label change background color when the mouse is over it, and change back when the mouse exits. Doing this using the xojo mouseenter and mouseexit events works most of the time but sometimes fails. Either the background doesn’t change when the mouse is over the label, or the background doesn’t change back when the mouse leaves. I’m wondering if there is a way to do this with javascript. I tried attaching it to the label style in the app header, like this:

.catlabel11 { color: white ; background-color: black; font-size:14px; onmouseover: "'white';'black';" ; onmouseout: "'black';'white';"; font-family: 'Lato', sans-serif;} }

That does not work, but I’m not sure whether the code is wrong or if this just isn’t possible.

Have a look at the hover portion of webstyle. Applying a different background color will do what you want without any code on your part.

Thanks; don’t know how I missed that.