-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's possible to fill paragraph's background? #254
Comments
It is possible to fill background of a paragraph. area.setParagraphStyle(parIndex, style); What text-flow.has-caret {
-fx-background-color: #f2f9fc;
} You still need to handle changes of the current line ( Since this could be a common use case, I can imagine text-flow:has-caret {
-fx-background-color: #f2f9fc;
} in your stylesheet. |
Thank you. For some reason, in the version I use, the method |
If you try the snapshot release, you can now use the If you are now working with the 0.6.10 version, be prepared that there will be some backwards incompatible changes in 0.7, so be prepared that you might have to modify your source code. |
It works using css, but does not works if need to highlight paragraph programmatically in 0.7 M2
|
@iazarny Are you sure? Your example isn't using the right CSS as explained in the CSS Ref Guide. Did you try |
@JordanMartinez Yes, I try , but result still the same - particular paragraph not highlighted. |
Ok. Thanks for the update. This issue might be fixed by #398. |
@iazarny class |
@JFormDesigner result is very funny , works very unstable .
Together with syntax highlighting may lead to stack overflow
|
@iazarny Can you post a small demo that reproduces the issue? |
My first assumptions was wrong, it related not to paragraph highlighting, but to syntax highlighting. Long comments. Modified JavaKeywords provided public class JavaKeywords extends Application {
} ` |
@iazarny The code works if only 5 lines of your "string string string" text are left uncommented out. As soon as I uncomment the 6th line, I get this error Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at java.lang.Character.codePointAt(Character.java:4866)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3775)
at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4847)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777)
at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658) |
Some text editors fill all line where the caret is, or IDEs in 'wrong syntax' with red.
The text was updated successfully, but these errors were encountered: