Skip to content

Tabbar styling in dockspace #3521

Open
Open
@dgregorius

Description

Version/Branch of Dear ImGui:

Version: 1.79
Branch: Docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_opengl3.cpp + imgui_impl_glfw3.cpp
Operating System: Windows 10 (2004)

My Issue/Question:

I want to hide the "Hide Tab Bar" and "Close" button of dock window tabs. The only way I was able to achieve this was by overwriting the shared flags of each node using ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton. This flags are private and internal. So I am unsure if this is the correct way or if there is a better way to achieve this.

EDIT:
Also, in this context I am wondering how to change the height of the tab?

Screenshots/Video

Tab

Standalone, minimal, complete and verifiable example: (see #2261)

ImGui::DockBuilderDockWindow( RN_VIEWPORT_WINDOW, DockMainID );
ImGuiDockNode* MainNode = ImGui::DockBuilderGetNode( DockMainID );
MainNode->LocalFlags |= ImGuiDockNodeFlags_NoWindowMenuButton | ImGuiDockNodeFlags_NoCloseButton;

If anybody tries this make sure you delete imgui.ini beforehand. Otherwise your changes might not have any effect!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions