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.

janekb04
  • 4,304
  • 2
  • 20
  • 51
real_dev04
  • 145
  • 2
  • 8

2 Answers2

9

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.

janekb04
  • 4,304
  • 2
  • 20
  • 51
  • Hey! Thank you very much for your help. It worked!. I really appreciate your help! – real_dev04 Sep 06 '21 at 17:05
  • @real_dev04 Hi, if the answer was helpful to you, you may [upvote it](https://stackoverflow.com/help/why-vote) and [mark it as accepted](https://stackoverflow.com/help/someone-answers) to make it easier to find later by others. – janekb04 Sep 06 '21 at 17:19
  • 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` ;-) – real_dev04 Sep 12 '21 at 08:50
0

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));

user3625178
  • 91
  • 1
  • 1