-
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
'Variables' in rich text #1197
Comments
First off, cool project - hope it brings you much enjoyment and not too much frustration :-) Second, in case you don't have it here's the JavaFX CSS reference page. Third, you are right (as far as I know) JavaFX doesn't have Forth, my suggestion: Would a border or background of some kind around the variable maybe work ? |
Thanks for the suggestion. I have time to experiment with the various ways to style variables. What the user will see is for example Page 5, and not Page <pagenum>, so it is a question of putting the variable in the styling string somehow and then substituting when the area is displayed. I would prefer not to change any code in RichTextFX itself. I just use the fat jar. Yes, this is a fun and challenging project. I moved from Objective-C to Java in 2000 with a job move. I prefer Java, With JavaFX I don't need to do much window management,and don't have to worry about recovering freed memory space. However, event handling is a pain because my Canvas is enclosed in a ScrollView, which (not documented) intercepts the arrow keys, and I anchor the Canvas with other nodes (such as RichTextFX areas), so I had to completely re-design the event handling so the right node gets the right events at the right time. Also, JavaFX does not correctly measure some fonts, so I have a mixture of FX font handling and AWT font handling in the same program. |
I have started exploring RichTextFX. I am porting 56,000 lines of Objective-C that I wrote for NextStep in the 1990s to JavaFX, and need an editable styled text box in graphics documents (used for running headers and footers etc). I have multiple InlineCssTextArea in the document, with editor buttons in the GUI of the application. What I need now is to insert 'variables' such as page number, total number of pages, date and time etc into the styled areas. I am happy to do the coding to replace the variable with the appropriate value, but I would like to know a good way to represent variables in the styled area. It would be cool if CSS had something like -fx-variable:pagenum, but I don't think it does. Any suggestions?
The text was updated successfully, but these errors were encountered: