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

How to change color of selected text? #974

Open
jamesaw668 opened this issue Oct 19, 2020 · 1 comment
Open

How to change color of selected text? #974

jamesaw668 opened this issue Oct 19, 2020 · 1 comment

Comments

@jamesaw668
Copy link

I want to change the color of the currently selected text so that it is white. How would I do this?

Using the CSS Reference Guide I have been able to change the colour of the selection rectangle from the default blue but cannot find a way to change the color of text in the bounds of this selection. I want this to be set regardless of the underlying style set by my code.

For example, the JavaKeywordsDemo sets the color of the keyword "final" to purple & it remains purple when selected. I want it to turn white when selected (along with any other non-keyword text in the selection) but become purple again when the selection is removed.

@Jugen
Copy link
Collaborator

Jugen commented Oct 21, 2020

I think this is due to a JavaFX bug, see PR #428 Fix -fx-highlight-text-fill (selected text color)

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

2 participants