-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Table: set minimum width for stretch column #5685
Comments
Hello, |
I have looked and I don't think I can reliably implement this quickly. There are subtle and conflicting constraints involved to get this right with multiple stretched columns, resizable and reorderable columns, it doesn't seem like a simple problem to solve (may take me up to a day to reliably test and implement). |
@ocornut: Thanks for having a look Omar! I'm afraid i don't have funds to help you prioritize this. Since it is already on your todo list, feel free to close this issue if you think that its not needed. Thanks again for all your great work! I'm really loving working with imgui, it not only works well, but also appears as really well thought out! |
I’ll keep this open. Honestly it is a bit frustrating that it isn’t more simple but I may get around to do it eventually. Another slight problem if we don’t have the API entry point to specify that value and TableSetupColumn() already takes a weight, so there’s a bit of design required. |
I have a similar usecase, and was wondering as a possible solution if it might be possible to define a column as:
My thought is that it'd then allow ImGui to compute essentially |
Version/Branch of Dear ImGui:
Version: 1.82
Branch: master, https://github.com/ocornut/imgui/tree/35b1148efb839381b84de9290d9caf0b66ad7d03
Back-end/Renderer/Compiler/OS
Back-ends: glfw
Compiler: unsure, using pyimgui wrapper, dev/2.0 version (https://github.com/pyimgui/pyimgui/tree/dev/version-2.0)
Operating System: Windows 10, 10.0.19044
My Issue/Question:
In a child window with vertical and horizontal scroll, I'm using a table to layout a list of items. I have a few fixed width columns, then a column that should be as wide as possible, and then some more fixed width columns (from 1 to many). The problem is that if there are many fixed width columns after my stretch column, the stretch column becomes very narrow and its contents thus invisible. Is it possible to set a minimum width for a column so that it cannot become too tiny, while simultaneously have it stretch to take up all the available space in the child not taken by the other columns?
I noticed this seems to be on the todo list, but perhaps there is a workaround for this case?
Screenshots/Video
With not many columns it looks good (nicely filled-out interface):
With many columns, the name column becomes practically invisible because its so narrow. I would like it to have a minimum width:
The text was updated successfully, but these errors were encountered: