I'm trying to make a TextArea readonly, but the text I am setting the TextArea to is so long it needs to be scrolled. A scroll bar appears when the text is set, but the scrollbar is not functioning.
I am using an .fxml file to hold my TextArea with the following code:
<TextArea fx:id="consultantScheduleTextArea" editable="false" focusTraversable="false" prefHeight="454.0" prefWidth="597.0" visible="false" />
My understanding is this is making it so I can't focus on it (like tab to the container or click into it), its not editable (so I can't change the text by typing), and it starts invisible. I've tried setting focusTraversable to true with no change of behavior.
In my controller, I set the visibility to true when a button is clicked then get some string data from a db, format it a certain way, then do this to set the content of the TextArea.
myTextArea.appendText(myString);
The result is my TextArea is filled with the content I have in myString, scrollbar is auto-created because the string is actually a lot of lines (lets say 300 lines), but again I cannot scroll it.
Any help?
EDIT: I didn't mention, this TextArea is wrapped in a stackpane which is wrapped in a gridpane. I don't think these matter at all, but just in case. This hierarchy is because its part of a complete app I have and this is just one component on one of the GUIs.