-
-
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
Column with variable width content not updating scroll area width #2142
Comments
Hello @Alan-FGR,
At the moment columns are a container which do not report the size of their contents outside. There's a temporary workaround you can use which restore pre-1.51 bug/behavior of reporting the farther X position of the last column, which happens to be specifically useful in a couple of case including yours. You can use this internal API instead of
Please note that for simple use and in particular your use here, you are probably better off not using Columns at all, and just using SameLine() to position the cursor after the first call to |
Hello @ocornut! Thank you for your reply. Yes, I've ended up going with just labels and buttons and using SameLine(), it works just as well but there's no vertical separator 😛 what's no big deal... in any case that trick/workaround could come handy I guess, it's always good to have them up my sleeves, but yeah I won't be using columns when I need that kind of behavior. Columns have their uses though, I think especially when you want to allow the user to resize them. I think this is a legit bug/improvement so I won't close the issue. PS: 12345 stars is happening 😆 |
IT HAPPENED!! 🤣 |
…ColumnFlags_*. (#125, #513, #913, #1204, #1444, #2142, #2707) Affected: ImGuiColumnsFlags_None, ImGuiColumnsFlags_NoBorder, ImGuiColumnsFlags_NoResize, ImGuiColumnsFlags_NoPreserveWidths, ImGuiColumnsFlags_NoForceWithinWindow, ImGuiColumnsFlags_GrowParentContentsSize. Added redirection enums. Did not add redirection type.
Closing this as new tables api has more configurability + support for horizontal scrolling and horizontal freezing. |
Version/Branch of Dear ImGui:
1.65
Back-end file/Renderer/OS:
Back-ends: imgui_impl_sdl.cpp + imgui_impl_dx11.cpp
OS: Windows 7
My Issue/Question:
I want to make a table consisting of two columns, one with variable width, but the scroll area isn't updated according to the width of the columns.
Standalone, minimal, complete and verifiable example:
Screenshots/Video


Use case:
Example code:
The text was updated successfully, but these errors were encountered: