Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Is there any way of auto scroll down a ScrollPane control when it content's height increases ? For example, I have a TitledPane on the bottom of the screen (inside a ScrollPane) and when I expand it I would like the ScrollPane to scroll down so I can see the entire content of the TitledPane.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
677 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can bind the ScrollPane vvalue property with the heightProperty of the inner container. For example, if you have a VBox in your ScrollPane:

scrollPane.vvalueProperty().bind(vBox.heightProperty());

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...