Saeed Masoumi
Saeed Masoumi

Reputation: 8926

How to scroll in ScrollPane with mouse?

Is it possible to move vertically and horizontally without using scrollbar in ScrollPane i want to scroll when left mouse button pressed and mouse moved to right, left, top and down . Should i add listener or something like that ? thanks in advance.

Upvotes: 4

Views: 3447

Answers (1)

James_D
James_D

Reputation: 209724

Just call

scrollPane.setPannable(true);

or, if you are using FXML

<ScrollPane pannable="true" ... >

Upvotes: 13

Related Questions