I have a Label inside a ScrollPane. I am updating the label in a loop (In another thread). How can I update the ScrollPane so it scrolls down (not sideways, this will be done manually) if the user doesnt hold it at a position? Is there a setter for it?
To set the ScrollPane to the bottom automatically set the vvalue
of the ScrollPane element, like this:
@FXML private ScrollPane scroll; //this must match the fx:id of the ScrollPane element
scroll.setVvalue(1.0); //1.0 means 100% at the bottom
This works in my code:
scrollPane.vvalueProperty().bind(mainGrid.heightProperty());
in my case scrollPane contains mainGrid
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With