1

I am using StyleClassedTextArea like a textbox with styles in my app

However the text inside StyleClassedTextArea doesn't appear to be properly padded on all sides like it does in the textbox

StyleClassedTextArea enter image description here

Textbox:

enter image description here

I have tried this:

.styled-text-area .paragraph-box:first-paragraph .paragraph-text {
    -fx-padding: 10 10 10 10;
}

Doesn't seem to work.

Please suggest a solution

Rahul Yadav
  • 2,627
  • 5
  • 30
  • 52

2 Answers2

0

Please try this;

.styled-text-area .content {
    -fx-padding: 10.0 10.0 10.0 10.0;
}
mtrgn
  • 131
  • 2
  • 4
0

Use this code

.styled-text-area .paragraph-box:first-paragraph:last-paragraph .paragraph-text {
    -fx-padding: 5 8;
}

Give more height to StyleClassedTextArea, and try different values for padding.