leventmesutpehlivan
leventmesutpehlivan

Reputation: 11

Get cursor position in ScrollPane component

I have a JavaFX app where a Vbox contains multiple textarea children. The VBox is then added to a ScrollPane. Now if the user adds multiple lines the scrollPane does not automatically scroll to the cursors position, so the cursor is not visible anymore.

I already can listen to the heightproperty change and can set the scrollbar position by setting scrollBody.setVvalue.

My question is how can I get the current cursor position height relative to the scrollPane?

Upvotes: 1

Views: 235

Answers (0)

Related Questions