I'm having an issue with a JFXSlider and a ScrollPane. Since I don't like the default style of the scrollbar, I'm using a JFXSlider to move the ScrollPane up and down.
slider.valueProperty().addListener((ChangeListener) ->
scrollPane.setVvalue(Math.abs(slider.getValue() - 100) / 100));
This piece of code works just fine, but when I add content to the ScrollPane, it stays in its place. I would like to move it to the bottom. I've tried changing the position of the ScrollPane after inserting the contents, but it does nothing.
anchorPane.localToScene();
scrollPane.setVvalue();
I also tried to bind the ScrollPane vValue to the height of the vBox that it has inside and it worked, but the JFXSlider stopped working
scrollPane.vvalueProperty().bind(vBox.heightProperty());
I would like to have both working at the same time, but I don't know if it's possible. I've heard about bindBidirectional, but I don't know how to use it in this case.
Thanks in advance.