Hello! I'm a bit of a CSS novice. So I apologize in advance if this turns out to be a stupid question.
I'm trying to change the color of the text in a StyleClassedTextArea. I've tried all sorts of things and nothing is changing it. It just stays black.
Here's all of the code:
StyleClassedTextArea projectNameField = new StyleClassedTextArea();
projectNameField.insertText(0, project.getName());
projectNameField.setBackground(Background.EMPTY);
String fontStyle = "-fx-font-family: '" + robotoRegular20.getFamily() + "'; -fx-font-size: " + robotoRegular20.getSize() + ";";
String colorStyle = "-fx-fill: " + Button.getTextColorCode() + ";";
String borderStyle = "-fx-border-color: " + Button.getTextColorCode() + "; -fx-border-width: 0 0 1 0;";
projectNameField.setStyle(fontStyle + colorStyle + borderStyle);
Just to clarify, the Button.getTextColorCode() works everywhere except on the text area color.
Why isn't -fx-fill working here? I also tried various other color commands. None of them do anything.
Thanks for your time and the API!
Hello! I'm a bit of a CSS novice. So I apologize in advance if this turns out to be a stupid question.
I'm trying to change the color of the text in a StyleClassedTextArea. I've tried all sorts of things and nothing is changing it. It just stays black.
Here's all of the code:
Just to clarify, the Button.getTextColorCode() works everywhere except on the text area color.
Why isn't -fx-fill working here? I also tried various other color commands. None of them do anything.
Thanks for your time and the API!