JavaFX ScrollPane scroll child to bottom
-
Hi. Is there a build-in function like in `C#` to scroll the child into viewport of `ScrollPane`? If not, how to achieve that using `setVvalue()` method of `ScrollPane`? I use below method to scroll, but it scrolls every control to the top of the viewport, but I want to scroll controls which are in the bottom of viewport to the bottom. ```java Bounds bounds = scrollPane.getViewportBounds(); scrollPane.setVvalue(flowPane.getChildren().get(3).getLayoutY() * (1/(flowPane.getHeight()-bounds.getHeight()))); ```
-
Hi. Is there a build-in function like in `C#` to scroll the child into viewport of `ScrollPane`? If not, how to achieve that using `setVvalue()` method of `ScrollPane`? I use below method to scroll, but it scrolls every control to the top of the viewport, but I want to scroll controls which are in the bottom of viewport to the bottom. ```java Bounds bounds = scrollPane.getViewportBounds(); scrollPane.setVvalue(flowPane.getChildren().get(3).getLayoutY() * (1/(flowPane.getHeight()-bounds.getHeight()))); ```