On 11/1/18 2:19 PM, Sverre Moe wrote:
scene.getStylesheets().add(getClass().getResource("light.css").toExternalForm());
Here is the CSS content for light.css
.titled-pane > .title {
-fx-color: rgb(220, 220, 220);
Well, there you go. Your 'light.css' style trumps the setBackground. The
final HBox root =new HBox();
> root.getChildren().add(titledPane);
>
> primaryStage.setTitle("Maybe a TitledPane bug");
> primaryStage.setScene(new Scene(root,300,250));
> primaryStage.show();
>
> final Region titleNode = (Region)titledPane.
HBox root =new HBox();
root.getChildren().add(titledPane);
primaryStage.setTitle("Maybe a TitledPane bug");
primaryStage.setScene(new Scene(root,300,250));
primaryStage.show();
final Region titleNode = (Region)titledPane.lookup("*.title");
ti
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