You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm currently building an application which requires me to use CodeArea and I would like to implement mouse wheel scrolling zoom, therefore I need to get a actualy font size and increase/decrease it. I didn't find any method to get that, as getFont() doesn't seem to exist. From what I've yet understood, the font size value can be stored in CSS like this:
.styled-text-area .text {
-fx-font-size:24pt;
}
But I'm not really sure how could I retrieve it! I will be grateful for any response! Thanks!
The text was updated successfully, but these errors were encountered:
I see what you mean. The thing is now, that I would like to change font size of the actual text when zooming, using CodeArea#setStyle won't work as expected. It will only change the size of line numbers, but not the text itself. How can I do that?
This can't be done using CodeArea because it extends StyleClassedTextArea which uses CSS style classes that cannot be changed dynamically. To do what you want (using the technique suggested by @PavelTurk) you need to use InlineCssTextArea instead but creating your own CodeArea to extend that is not straightforward.
An alternative idea is to maybe set the scale on the CodeArea instead ?
Hello, I'm currently building an application which requires me to use CodeArea and I would like to implement mouse wheel scrolling zoom, therefore I need to get a actualy font size and increase/decrease it. I didn't find any method to get that, as
getFont()
doesn't seem to exist. From what I've yet understood, the font size value can be stored in CSS like this:But I'm not really sure how could I retrieve it! I will be grateful for any response! Thanks!
The text was updated successfully, but these errors were encountered: