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 text color in JFXTextField? #549

Closed
henzosabiq opened this issue Dec 29, 2017 · 3 comments
Closed

How to change text color in JFXTextField? #549

henzosabiq opened this issue Dec 29, 2017 · 3 comments

Comments

@henzosabiq
Copy link

This is my scene :

jfxtextfield

I want to change the text color to white. I've tried google but I cant find any identical issue.
So, how? Thanks in advance.

@Puliczek
Copy link

Puliczek commented Dec 31, 2017

if this is a normal text, you can try by adding a style:
JFXTextFieldName.setStyle("-fx-text-inner-color: red");

Otherwise, if this is a hint text you should try this:
JFXTextFieldName.setStyle("-fx-prompt-text-fill: red");

both works for me.

@jfoenixadmin
Copy link
Collaborator

jfoenixadmin commented Jan 2, 2018

you can set them through css using the following code

.jfx-text-field, .jfx-password-field {
    -fx-prompt-text-fill: WHITE;
    -jfx-focus-color: WHITE;
    -jfx-unfocus-color: WHITE;
}

Regards,

@MRoblesBEA
Copy link

MRoblesBEA commented Oct 8, 2019

you can use this in your .css
.jfx-text-field
{
-fx-text-inner-color: white;
}

white is the text color, or you can use hexadecimal, #ffffff(white)

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

4 participants