Given I have added the class style 'checkless-checkbox' to my CheckBox, I can then specify the following CSS code within a CSS file, to effectively hide the Box and Mark sub-components of the JavaFX CheckBox.
.checkless-checkbox>.box { -fx-background-color: transparent; }
.checkless-checkbox:selected>.box>.mark{ -fx-background-color:transparent; }
Can I, and if so how, specify the CSS styles for .box and :selected>.box>.mark sub-components programmatically from my Java code rather than having to add a CSS file?
Aucun commentaire:
Enregistrer un commentaire