-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Scroll view to keep rect into view #2900
Comments
For you can use Please note that 1.62 is rather old at this point so some suggestions/issues may not apply or you may run into different issues than if using latest master. Linking #2812 there is some work to be done on scrolling helpers/policies. |
Regarding I also checked the version I again. Looks like we're at 1.70. I guess should bump up to 1.72. |
…ed (fix nav in one axis scrolling back and forth between axises when space is tight by just < ItemSpacing*2) (ocornut#3692, ocornut#2812, ocornut#4242, ocornut#2900) Amend 8f495e5
…ary. For instance triggered by a treenode one scroll away, navigated to via keyboard valid first item character key press. See also: ocornut/imgui#2900
Version/Branch of Dear ImGui:
Version: 1.62
Branch: Master
Back-end/Renderer/Compiler/OS
Back-ends: imgui.net
Operating System: Win10
My Issue/Question:
I'm struggling to scroll an area of a window into view. I studied the documentation and played around with various combinations of
IsRectVisible
andSetScrollHereY
.I don't understand, why SetScrollHereY() needs the paramete:. If the out-of-view area was below the visible region, I expect it to be at the bottom. Otherwise at the top. I would prefer a solution like "keep this rectangle visible, but scroll only if necessary and as little as necessary". I know that this is possible, because the Demo-Windows does just that, but can't get it to work.
Screenshots/Video
I'm changing an item with cursor-keys up down. The focus is inside a search-field.
My current (very messy code) looks like this, although I'm not sure if it helps:
The text was updated successfully, but these errors were encountered: