Skip to content
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

Set text background/text highlight color #369

Closed
isjns opened this issue Oct 3, 2016 · 2 comments
Closed

Set text background/text highlight color #369

isjns opened this issue Oct 3, 2016 · 2 comments

Comments

@isjns
Copy link

isjns commented Oct 3, 2016

I'm currently trying to customize the styles in your JavaKeywordsAsync.java example.

Say I want to give keywords a background/highlight color (the use of "highlight" might be a little confusing since the CSS property "-fx-highlight-fill" is actually a property for the selection color in JavaFX, but normally it is a term used for the background color of specific segments of text) by changing the properties in the java-keysword.css, how would I go on doing this? Is it possible?

I've tried using both "-fx-background color" and "-fx-background-fill", but neither seeems to do the trick:

.keyword {
-fx-fill: purple;
-fx-font-weight: bold;
-fx-background-color: blue;
-fx-background-fill: blue;
}

Thanks in advance!

Best regards
Jonatan

@TomasMikula
Copy link
Member

Note that JavaFX Text does not support background color. We added it in some recent release as -rtfx-background-color (see the wiki).

@JordanMartinez
Copy link
Contributor

It seems that this issue was resolved but never closed, so I'm closing it.
If it hasn't been resolved, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants