Remove Title Bar in ImGui
Asked Answered
C

2

5

I would like to know that how do I remove the title bar from an ImGui Window. I am using C++ with GLFW for this.

Columbia answered 6/9, 2021 at 15:51 Comment(0)
E
10

You can use the ImGuiWindowFlags_NoTitleBar flag when creating the window:

ImGui::Begin("Window Name", &is_open, ImGuiWindowFlags_NoTitleBar);
// ... render window contents ...
ImGui::End();

An example of this and other flags you can use on an ImGui Window is located in imgui_demo.cpp.

Emotion answered 6/9, 2021 at 15:56 Comment(3)
Hey! Thank you very much for your help. It worked!. I really appreciate your help!Columbia
@Columbia Hi, if the answer was helpful to you, you may upvote it and mark it as accepted to make it easier to find later by others.Emotion
I can't, because it's saying Thanks for the feedback! You need at least 15 reputation to cast a vote, but your feedback has been recorded ;-)Columbia
B
1

To hide the title string for any ImGui element, you can also write ## in front of your title string. Eg: ImGui::Button("##Button", ImVec2(20, 20));

Boustrophedon answered 1/4, 2023 at 14:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.