ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
57.84k stars 9.92k forks source link

How the menu adaptively changes as the treenode opens #7683

Open ChisatoNishikigi73 opened 3 weeks ago

ChisatoNishikigi73 commented 3 weeks ago

Version/Branch of Dear ImGui:

Version 1.88, Branch: master (master/docking/etc.)

Back-ends:

imgui_impl_dx11.cpp

Compiler, OS:

Win10 + Vss

Full config/build information:

No response

Details:

How do I expand the treenode to fit the menu size to the treenode so that I can see all the options

Minimal, Complete and Verifiable Example code:

if (ImGui::TreeNode("Basic"))
{
    static intptr_t basicDataAddr = 0x0;
    static int day = 1;
......
GamingMinds-DanielC commented 3 weeks ago

Not sure what your exact goal is, your question is not very clear. If you want your tree nodes to be expanded by default, use ImGui::TreeNodeEx() with ImGuiTreeNodeFlags_DefaultOpen.

ChisatoNishikigi73 commented 1 week ago

Not sure what your exact goal is, your question is not very clear. If you want your tree nodes to be expanded by default, use ImGui::TreeNodeEx() with ImGuiTreeNodeFlags_DefaultOpen.

Thank you for your response, I think my imgui window gets bigger as the dropdown bar opens, for example if I open the dropdown bar, my imgui window can't show all the information, but I want to stretch the imgui window down at the same time, so that all the information can be displayed all the time

ocornut commented 1 week ago

I don't understand your message. Please provide more context and code. Maybe you simply want to pass ImGuiWindowFlags_AlwaysAutoResize to your Begin() call ?