-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Horizontal Scrolling Child Window and CollapsingHeader #7659
Comments
When i run your code, i dont get horizontal scrollbar when the CollapsingHeader name goes beyond the child window, no matter if the ImGui::Text is there. Horizontal scrollbars are disabled by default, so I dont know how you got a scrollbar without a corresponding flag. If you need a horizontal scrollbar, just pass Also, why are you passing |
We changed the signature of BeginChild() quite recently (Sept 2023) // old
bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false;
// current
bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0);
// Flags for ImGui::BeginChild()
// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.
enum ImGuiChildFlags_
{
ImGuiChildFlags_None = 0,
ImGuiChildFlags_Border = 1 << 0, // Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
...
}; Which allowed a smoother transition, so old code frequently uses |
Oh, didn't know that. |
Version/Branch of Dear ImGui:
Version 1.90.6
Back-ends:
Raylib/OpenGL
Compiler, OS:
Windows 10
Full config/build information:
No response
Details:
This code draws a child window and a CollapsingHeader and when the length of the CollapsingHeader name goes beyond the child window, a horizontal scroll is drawn in the child window. Everything is working fine.
But if I remove the line ImGui::Text("Hello, world!") from CollapsingHeader, then the child window will no longer draw a horizontal scroll if the length of the CollapsingHeader name extends beyond the child window.
Is this how it should be?
The text was updated successfully, but these errors were encountered: