[ACCEPTED]-Remove borders from TextField-javafx-8
Accepted answer
Try adding this to your CSS:
.text-field {
-fx-text-box-border: transparent;
}
If you also 6 want to remove the focus ring, add (similar 5 to what you have):
.text-field:focused {
-fx-focus-color: transparent;
}
Unfortunately, this will 4 only remove the visible border, the insets 3 will still be there. To remove completely, you 2 have to add quite some CSS (easiest is to 1 copy & paste from caspian.css
).
Something like:
.text-field {
-fx-background-color: -fx-control-inner-background;
-fx-background-insets: 0;
-fx-padding: 1 3 1 3;
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.