M
M
Max2021-07-02 14:54:33
JavaFX
Max, 2021-07-02 14:54:33

How to make TextFild not change text color when changing input focus?

When changing the input focus in the TextFild, the color of the text changes spontaneously, which I don’t understand. Tell. I am attaching a photo and css. It shouldn't be like this
60defdf88e957170838627.png

.text-field {
   -fx-font-family: 'Time New Roman';
   -fx-font-size: 12.00;
   -fx-padding: 3 3 3 6;
   -fx-border-color: grey;
   -fx-border-radius: 1;
   -fx-background-color: #ffffff;
   -fx-text-fill: #596D70;
   -fx-min-height: 30;
   -fx-font-weight: bold;
   -fx-highlight-fill: rgba(0,0,0,0.5);
   -fx-highlight-text-fill: white;
}
.text-field:focused {
   -fx-border-color:#FFD366;
}
.text-field:readonly {
   -fx-border-color: green;
}
Так быть должно
60defde200229702469179.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question