You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to scroll to the certain part of the table when window is just presented to user and let the user to scroll freely after that. I am using flag to call scroll function only on the first frame.
I found that using ImGui::SetScrollY will introduce 1 frame delay, which is visible in some situations.
Then I tried to use SetNextWindowScroll which should work on the same frame. But whatever I try it won't work on the first frame. Only on second. I found #6349 issue but adding SetNextWindowContentSize doesn't help.
In console I see that ContentSize was set but Scroll was not:
Thank you for your report and the repro which helped me look at it swiftly.
The issue was because tables are resetting scroll themselves on scrolling flags changes and init:
// Reset scroll if we are reactivating itif ((previous_flags & (ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY)) == 0)
SetNextWindowScroll(ImVec2(0.0f, 0.0f));
It should now be fixed with 43c51eb.
Thanks again!
Version/Branch of Dear ImGui:
v1.91.5 docking-experimental
Back-ends:
imgui_impl_glfw.h + imgui_impl_opengl3.h
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
Details:
Hello!
I am trying to scroll to the certain part of the table when window is just presented to user and let the user to scroll freely after that. I am using flag to call scroll function only on the first frame.
I found that using
ImGui::SetScrollY
will introduce 1 frame delay, which is visible in some situations.Then I tried to use
SetNextWindowScroll
which should work on the same frame. But whatever I try it won't work on the first frame. Only on second. I found #6349 issue but addingSetNextWindowContentSize
doesn't help.In console I see that
ContentSize
was set butScroll
was not:Here is my minimal code. Please note that not entire window is scrollable but only the table.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: