Re: Maybe a TitledPane bug

2018-11-01 Thread David Grieve
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

Re: Maybe a TitledPane bug

2018-11-01 Thread Sverre Moe
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.

Re: Maybe a TitledPane bug

2018-11-01 Thread David Grieve
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

Maybe a TitledPane bug

2018-10-31 Thread Sverre Moe
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