Underline custom javafx

Asked

Viewed 90 times

1

It is possible to leave a text (or any text Node) with custom underline. Like microsoft word when there is an error word.

Using the CSS

1 answer

1


So you can try using the textflow of javafx8 to structure your text, so you get individualized control by word. I didn’t test this inside the textflow, but on a label you can do:

Erro
{
    -fx-border-width: 0 0 2 0;
    -fx-border-color: red;
    -fx-border-style: dashed;
}

In place of dashed could be used dotted to get dotted instead of dashed.

  • This does not provide an answer to the question. To criticize or ask for clarification from an author, leave a comment below its publication - you can always comment on your own publications and when you have reputation points enough you will be able comment on any publication. - From Review

  • @Brunocésar, this is yes is a valid answer, had formatting problems; if you want to give -1 is welcome, but I think the vote to delete does not proceed. . . . . Lucas, give a check on [Answer], and as a hint it’s better to get straight to the point, instead of "try to use such a thing...", if you can, say "use such a thing..." after giving that basic test ;)

  • @Brasofilo opa, thanks for the feedback, but I don’t agree. A response should have content that actually leads to the solution. It is true that the question does not help, it makes the answer broad, but answers that suggest "try" do not actually seek the resolution of the problem.

  • Only if it is totally harmful, completely outside the scope of the question. Otherwise, it has -1, editing and constructive comments.

  • Thank you for the comments, I will try to be more constructive and go straight to the point next time.

  • I do not understand these comments, the answer is great ...

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.