Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling scrollDownPct after adding an Element to a GUIScrollArea does not work properly #338

Open
KirmesBude opened this issue May 28, 2019 · 0 comments

Comments

@KirmesBude
Copy link

Hi,

I opened a topic on discourse regarding ScrollArea here https://discourse.bsframework.io/t/guiscrollarea-elements/447 .

This is an issue for the first problem I had:

I add a new Element to the GUIScrollArea after I detect an certain input. Right after adding the element, I also make sure to scroll all the way down with scrollDownPct(1.0) . But this does not seem to work. I am always one element short of being at the very bottom. I assume the layout has not properly updated with the new Element when I scroll down. What is the proper way to fix this?

I created a gist, because I could not get code formatting working right in the issue.
https://gist.github.com/KirmesBude/630e252c9d5290da1349ccffd2de4b2a

Press Space to add an element to the ScrollArea. You will see that the scrollbar goes down, but there is always one element out of view (below).
Uncommenting the line in the ButtonEvent callback "fixes" the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant