Hi, I had a couple questions about the ScrollViewer GUI component. Nice new digs!
- Is it possible from code to set the vertical or horizontal bar value, say based on some event (in my case, new text being added to a TextBlock inside the ScrollViewer)? For example, I may want to set the vertical scrollbar to the bottom when new text is appended to the end.
- I notice that if a scrollViewer is set to the bottom of content that is larger than the scrollViewer, if new content is added, it doesn’t seem to update properly.
- A playground probably demos this best: https://www.babylonjs-playground.com/#3EF49E#11 After loading the scene, scroll the ScrollViewer to the bottom before 5 seconds is up and the setTimeout events start firing to update the TextBlock inside the scrollviewer. Until you manually scroll up and down again, the new content isn’t shown.
I was able to solve the first item in my own fork of the ScrollViewer, but for the second, I had issues unless I used delayed events (via setTImeout) to alter the scrollbar values, which I suspect was because without the delay the new size of the TextBlock wasn’t calculated or something to that effect. using textBlock.onTextChangedObservable still seemed to be too early (I tried other variations which I don’t recall now).
Thanks as always for this wonderful engine!