Reputation: 101
I need to have rounded corners on TextArea, but it looks a bit weird. Seems, some inner layer should also have rounded corners with the same radius, but which one?
I use this CSS:
.text-area {
-fx-background-color: #dbb1b1, #fff0f0;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: red;
}
And it looks like this one: TextArea corners
Upvotes: 3
Views: 5656
Reputation: 101
Seems I was needed to post this question in order to find solution by myself :D
.text-area .scroll-pane {
-fx-background-color: transparent;
}
.text-area .scroll-pane .viewport{
-fx-background-color: transparent;
}
.text-area .scroll-pane .content{
-fx-background-color: transparent;
}
Upvotes: 5
Reputation: 21
You can follow this.Hope this should help.
.text-area {
-fx-border-radius: 10 10 0 0;
-fx-background-radius: 10 10 0 0;
/* top-left, top-right, bottom-right, and bottom-left corners, in that
order. */
}
Upvotes: 1