Valery Peschanyy
Valery Peschanyy

Reputation: 13

JavaFX how to make text underlined in textarea?

I tried:

    .hyperlink-text-area .content,
    .hyperlink-text-area {
        -fx-underline: true;
    }

But it not worked. I'm not sure now that texarea supports the underline.

Upvotes: 0

Views: 3388

Answers (1)

James_D
James_D

Reputation: 209408

The fx-underline property is a property of Text nodes, so you have to apply it to the text node belonging to the text area. Assuming the .hyperlink-text-area selector selects a TextArea (or other TextInputControl), you can do

.hyperlink-text-area .text {
    -fx-underline: true ;
}

Upvotes: 1

Related Questions