I tried using the LineNumberFactory
function to add line numbers but they only show as grayish rectangles How it looks
I tried to add the .lineno
and .fold-indicator
classes in my css file (like this)
.fold-indicator{
-fx-background-color:#292929;
}
.fold-indicator .lineno{
-fx-fill:#4a4a4a;
}
and change the background and text color but it didnt do anything. This is how my java code looks:
private Node createTextAreaBox() {
mainCodeArea = new CodeArea();
mainCodeArea.setId("mainCodeArea");
mainCodeArea.setParagraphGraphicFactory(LineNumberFactory.get(mainCodeArea));
if(initialText){
mainCodeArea.replaceText(textAreaText);
}
else{
mainCodeArea.replaceText("");
}
}
any ideas as to what could be wrong?
New contributor
ravengal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.