From olexyarm at outlook.com Tue Jun 17 20:21:31 2025 From: olexyarm at outlook.com (Oleksandr Yarmolenko) Date: Tue, 17 Jun 2025 20:21:31 +0000 Subject: comments for jfx.incubator.scene.control.richtext.RichTextArea Message-ID: Hello, I made a small home project and started to use jfx.incubator.scene.control.richtext.RichTextArea. It looks OK, but I think a few features are missing in it. 1) Missing method setPromptText similar to method in javafx.scene.control.TextArea: textArea.setPromptText("Enter Text here."); 2) It's not possible to set background color for selection, but only for whole paragraph. This is because "background" attribute is missing in "Character Attributes" (https://github.com/andy-goryachev-oracle/Test/blob/main/doc/RichTextArea/RichTextArea_DataFormat.md) 3) It's not possible to set caret position. The richTextArea.caretPositionProperty() has method getValueI(), but does not have method setValue(). Please, let me know if I'm missing something. Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.goryachev at oracle.com Tue Jun 17 20:46:34 2025 From: andy.goryachev at oracle.com (Andy Goryachev) Date: Tue, 17 Jun 2025 20:46:34 +0000 Subject: comments for jfx.incubator.scene.control.richtext.RichTextArea In-Reply-To: References: Message-ID: Dear Alex: Thank you for trying it out! Could you share with the purpose of your application or, rather, the function of RichTextArea in your application? 1) Missing method setPromptText similar to method in javafx.scene.control.TextArea: Good idea. Created https://bugs.openjdk.org/browse/JDK-8359862 2) It's not possible to set background color for selection The selection (I assume you mean selection, not a character attribute https://bugs.openjdk.org/browse/JDK-8356436) can be styled with CSS. See https://openjfx.io/javadoc/24/javafx.graphics/javafx/scene/doc-files/cssref.html#richtextarea Selection highlight is implemented in the skin as a Path with style "selection-highlight", like so: .rich-text-area .selection-highlight { -fx-fill: pink; } 3) It's not possible to set caret position. Use public final void select(TextPos pos) Hope this helps, and thanks again for trying it out! Cheers, -andy From: openjfx-discuss on behalf of Oleksandr Yarmolenko Date: Tuesday, June 17, 2025 at 13:21 To: openjfx-discuss at openjdk.org Subject: comments for jfx.incubator.scene.control.richtext.RichTextArea Hello, I made a small home project and started to use jfx.incubator.scene.control.richtext.RichTextArea. It looks OK, but I think a few features are missing in it. 1) Missing method setPromptText similar to method in javafx.scene.control.TextArea: textArea.setPromptText("Enter Text here."); 2) It's not possible to set background color for selection, but only for whole paragraph. This is because "background" attribute is missing in "Character Attributes" (https://github.com/andy-goryachev-oracle/Test/blob/main/doc/RichTextArea/RichTextArea_DataFormat.md) 3) It's not possible to set caret position. The richTextArea.caretPositionProperty() has method getValueI(), but does not have method setValue(). Please, let me know if I'm missing something. Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: