Is there any way of auto scroll down a ScrollPane control when it content\'s height increases ? For example, I have a TitledPane on the bottom of the screen (inside a Scroll
Donno if it is still relevant, I have had a similar issue-ish and this solution worked for me. I needed the scrollbar to auto scroll in an MVVM pattern. What I did was to bind the textarea's scrollTopProperty in the View with a SimpleDoubleProperty in the ViewModel. The only issue is that the scrollTopProperty, basically scrolls based on pixel so I increased it based on the number of lanes * 100;
View
textArea.textProperty().bindBidirectional(viewModel.SimpleStringProperty());
textArea.scrollTopProperty().bindBidirectional(viewModel.SimpleDoubleProperty());
ViewModel
SimpleDoubleProperty.setValue(SimpleStringProperty.getValue().split("\n").length * 100);
I know that the code is not really representative, but if someone needs more details of the implementations I can elaborate...