B4J Question How write CSS hover states in the .style method?

jmon

Well-Known Member
Licensed User
Longtime User
Hello,

I would like to be able to set hover or selected states in the .style method of the controls. I have tried many things, but I didn't manage to get it to work.

Basically, I would need something like this:
B4X:
btn.Style = "-fx-background-color:white; .:hover{-fx-background-color:black;} .:selected{-fx-background-color:red;}"

Thanks.
 

stevel05

Expert
Licensed User
Longtime User
When you're using more than just simple styles it'd probably be better off in an external css.
 
Upvote 0
Top