Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

TextField -fx-strikethrough add/remove problem

user9011773Jul 20 2012 — edited Jul 20 2012
Hi,

For some reason I must make text in a TextField control striken and dinamicaly return back to normal style.
I use custom style class, which is applied like this:

.invalid-optional-lov .text{
-fx-strikethrough : true;
}

private static final String style = "invalid-optional-lov";

textField.getStyleClass().add(style);

After some events I want to remove the style, to return back to normal style like this:
textField.getStyleClass().remove(style);

But there is NO efect!
Where I'm wrong? Or it is a bug?

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2012
Added on Jul 20 2012
2 comments
605 views