ScrollPane JavaFX make it scroll more?
Asked Answered
P

2

7

In javaFX scrollpane. It scrolls so slowly.. Any method to boost it up? I've looked all over here, and no luck.. I've found some thread about listview..

Demonstration:

enter image description here

Physiologist answered 30/10, 2016 at 11:23 Comment(1)
I see that there is a method on docs.oracle.com/javase/8/javafx/api/javafx/scene/control/… for setting the unit Increment. But how can i access it ?Physiologist
W
2

You could do this in the FXML styling.

.scroll-pane .scroll-bar:vertical {
-fx-unit-increment: 5 ;
-fx-block-increment: 5 ;
}

.scroll-pane .scroll-bar:horizontal {
-fx-unit-increment: 5 ;
-fx-block-increment: 5 ;
}

Play around with the unit and block increment numbers until you get a desired effect.

Wallace answered 7/2, 2019 at 15:53 Comment(1)
Seems like you got something. But I'm not committed to this project anymore. I'll accept this answer anyway.Physiologist
B
0

Set cache to true.

In the pane inside the scrollpane not scrollPane.

yourPane.setCache(true);

Or in SceneBuilder Properties-Extras-select Cache CheckBox

Bugleweed answered 8/8, 2018 at 21:4 Comment(1)
I'm no longer committed to the project anymore. How does cache control the amount you're able to scroll?Physiologist

© 2022 - 2024 — McMap. All rights reserved.