11 Replies Latest reply on Jan 12, 2013 7:05 AM by James_D

    How to underline the text of a TextArea

      Hi everybody,

      I've been trying to underline the text of a TextArea without success. I've tried different things like:
      TextArea textArea = new TextArea();
      textArea.setStyle("-fx-underline: true;");
      TextArea textArea = new TextArea();
      textArea.lookup(".text-input").setStyle("-fx-underline: true;");
      According the CSS reference guide (http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html) the -fx-underline property is available for a Text and a Labeled, and TextArea is not one of them. And a TextArea is a TextInputControl, which supports some font properties but none of them is an underlying one.

      Anybody has an idea? Or should I switch to a WebView?


      PS: configuration: OS X 10.7 | 10.8 - JDK 7u10 - JavaFX 2.2.4