-
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
Calculate highlighting of brackets #566
Comments
Your algorithm is right. However, CodeArea's style type is
where .code-area-bracket {
-fx-font-family: consolas;
-fx-font-size: 30pt;
} then you'd use codeArea.getStyleSheets().add(YourCustomArea.class.getResource("custom.css").toExternalForm());
// ...
codeArea.setStyleClass(match-1, match, "code-area-bracket"); |
facepalm that makes sense! Thank you! |
I had been looking at this example, https://github.com/TomasMikula/RichTextFX/blob/master/richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/FontSizeSwitcher.java Am I right then that the difference is that setStyle(...) gets passed a hardcoded value while setStyleClass(...) uses css? |
|
Closing since the original issue has been addressed. Feel free to keep asking questions though. |
I'm trying to calculate highlighting for brackets. And while I think the algorithm is right, I am not sure I'm using the right method to set the style. What I'm trying to do is say "Set the style for the characters from point A to point B", but codeArea.setStyle doesn't seem to be doing anything.
The text was updated successfully, but these errors were encountered: