Search code examples
libgdx

How to scroll instantly a ScrollPane in libgdx?


I would like to place the child actor at an initial position within the ScrollPane, but the scrollTo() method seems to only do a scroll animation, and doesn't allow to move the child actor instantly. Using the child actor's setPosition() has no effect too.


Solution

  • call updateVisualScroll() after programmatically updating the scroll position