0 down vote Favorite |
I try to style a Splitmenubutton in JavaFX. I ' ve got a Menubutton and a splitmenubutton in my fxml-file. My Css-file looks like this: .Menu-button{ -Fx-Background-Color:Red; }.Split-Menu-button.label { -fx -background-color:< Span class= "PLN" > Green;}.-menu-button .< Span class= "PLN" >arrow { -fx -background-color:< Span class= "PLN" > Yellow; /span>
But I can ' t figure out what to style of the area around the arrow for the Splitmenubutton. I tried several ways, but nothing worked .Split-Menu-button.Menu-button{ -Fx-Background-Color:Blue; }.Split-Menu-button.Menu-button.Label{ -Fx-Background-Color:Blue; }.Split-Menu-button.Menu{ -Fx-Background-Color:Blue; }.Split-Menu-button.Menu-Item{ -Fx-Background-Color:Blue; }.Split-Menu-button.button{ -fx-background-color: Blue;}.-menu-button .< Span class= "PLN" >menu-bar { -fx-background-color: Blue; /span> CSS JavaFX javafx-2 javafx-8 fxml
Share|improve this question |
Edited at 10:58
|
Asked at 10:20 Stef 32 |
|
|
Add a Comment |
1 Answer Active oldest votes
Up vote 2 down vote accepted |
There is, useful techniques for figuring out, the style classes for individual parts of complex.
- Extract The default style sheet, Modena.css, from the Jfxrt.jar file and see how the default styles is defined (you can a LSO find MODENA.CSS Online)
- Use Scenicview to inspect your application when it ' s running
In this case I used Scenicview; The CSS need is .split-menu-button .arrow-button { -fx-background-color: yellow ;}
|
How can I style a JavaFX Splitmenubutton in CSS