Sverre Moe
2018-10-31 22:58:12 UTC
I am not sure if I have stumbled upon a bug in JavaFX, or perhaps it is
simply something I am doing wrong.
After setting the TitledPane title background programmatically, then when
hovering the background color is reset to the previous value from CSS.
I get same behavior in both JavaFX 8 and JavaFX 11.
Color color = Color.valueOf("#00ff11");
titleNode.setBackground(new Background(new BackgroundFill(color, null,
null)));
titleNode.setStyle("-fx-background-color:#00ff11;");
Setting the style property seems to work, but why doesn't the
programmatically approach work?
https://stackoverflow.com/questions/53083005/javafx-titledpane-changed-title-background-is-reset-on-mouse-entered/
/Sverre
simply something I am doing wrong.
After setting the TitledPane title background programmatically, then when
hovering the background color is reset to the previous value from CSS.
I get same behavior in both JavaFX 8 and JavaFX 11.
Color color = Color.valueOf("#00ff11");
titleNode.setBackground(new Background(new BackgroundFill(color, null,
null)));
titleNode.setStyle("-fx-background-color:#00ff11;");
Setting the style property seems to work, but why doesn't the
programmatically approach work?
https://stackoverflow.com/questions/53083005/javafx-titledpane-changed-title-background-is-reset-on-mouse-entered/
/Sverre