-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
NoCollapse and NoTitleBar in docking #6282
Comments
It's not the window, but the dock space that you need to configure properly. Search for |
This and similar questions have been discussed in #5597 #4880 #3521 #3335 Essentially, the problem is that as multiple windows can be hosted by a docking-node, it isn't a correct default behavior that window apply their settings to parent node, as it would conflict if multiple windows were in that same node. You can use this: ImGuiWindowClass window_class;
window_class.DockNodeFlagsOverrideSet = ImGuiDockNodeFlags_NoTabBar;
ImGui::SetNextWindowClass(&window_class);
ImGui::Begin("Left", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar); ImGui::End();
ImGui::SetNextWindowClass(&window_class);
ImGui::Begin("Right", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar); ImGui::End();
ImGui::SetNextWindowClass(&window_class);
ImGui::Begin("Down", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar); ImGui::End(); However if you dock both of those windows together you won't see the tab bar... Maybe a better solution for you is to use |
Amazing it works perfectly! |
How can I do the exact opposite of this? |
I've worked it out after reading through the DockNodeUpdateTabBar source. ImGuiWindowClass winClass;
winClass.DockNodeFlagsOverrideSet = ImGuiDockNodeFlags_NoWindowMenuButton;
ImGui::SetNextWindowClass(&winClass);
ImGui::Begin("window");
... pretty much the same as above, but using ImGuiDockNodeFlags_NoWindowMenuButton. |
Branch: docking
Sorry for the stupid question but I couldn't find the solution.
I'm trying not to render the elements circled in red and I can't do it.
I tried to do it this way but it doesn't work
`ImGui::Begin("MainWindow", NULL, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoTitleBar);
ImGui::Begin("Left", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
ImGui::Begin("Right", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
ImGui::Begin("Down", NULL, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
`
The text was updated successfully, but these errors were encountered: