I have the following problem. I am trying to style a checkbox in JavaFX. The style is stored in a .css file and is added via getStylesheets().add() when the component is created.
The problem is that the style is only displayed correctly if it is defined twice. If the style is defined only once, the style is not applied.
.check-box>.box {
-fx-background-color: white;
-fx-border-color: blue;
-fx-border-width: 1;
-fx-border-radius: 4;
}
This doesnt work.
.check-box>.box {
-fx-background-color: white;
-fx-border-color: blue;
-fx-border-width: 1;
-fx-border-radius: 4;
}
.check-box>.box {
-fx-background-color: white;
-fx-border-color: blue;
-fx-border-width: 1;
-fx-border-radius: 4;
}
This works.
Does anyone know whats the problem here?
Aucun commentaire:
Enregistrer un commentaire