Lithicas
Lithicas

Reputation: 4013

JavaFX: Change text color of textarea

Alright so I can't get this to work at all. I've checked the CSS analyzer in the scene builder and I came to the conclusion that the way to change the text color in a textarea is something similar to this:`

.text-area .text {
    -fx-fill: #1e88e5;
    -fx-font-size: 32px;
}`

Problem is that the color doesn't change nor does the font size. Where am I going wrong here?

Upvotes: 1

Views: 9207

Answers (1)

Kachna
Kachna

Reputation: 2961

How about this:

.text-area   {
    -fx-text-fill: #1e88e5;
    -fx-font-size: 32px;
}

Update: the Style class text-area doesn't have a descendant named text. it has an immediate child named scroll-pane and a decendant named content .for more information see: this link

Upvotes: 5

Related Questions