Christian Moen
Christian Moen

Reputation: 1301

ScrollPane JavaFX make it scroll more?

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

Upvotes: 7

Views: 1758

Answers (2)

Dustin
Dustin

Reputation: 733

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.

Upvotes: 2

Saif Al Basrawi
Saif Al Basrawi

Reputation: 65

Set cache to true.

In the pane inside the scrollpane not scrollPane.

yourPane.setCache(true);

Or in SceneBuilder Properties-Extras-select Cache CheckBox

Upvotes: 0

Related Questions