-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
CollapsingHeader - close header #579
Comments
Hello, CollapsingHeader are actually using part of the TreeNode code under the hood so this is working:
It should probably be clarified. You can also directly access the storage map, e.g.
You might also use the If you need custom behavior, you can copy and strip CollapsingHeader out of most of the code you don't need.. at the end of the day it is merely a glorified button accessing a boolean value from storage, but it may make more sense to provide the state yourself. Lots of the code in there you don't need if you write a customized version (handling tree nodes/header modes, calling TreeNodeBehaviorIsOpened to query from storage and honor calls to SetNextTreeNode functions, handling of Log). |
Just committed a bunch of TreeNode/CollapsingHeader related change, and the ImGuiTreeNodeFlags type along with the location and code of CollapsingHeader should make it much more obvious now that CollapsingHeader is just a helper calling TreeNode, and therefore that SetNextTreeNode* functions are functional. Closing this! |
Is it possible to close a Collapsing header section?
You have the ability for windows to collapse in this function:
IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiSetCond cond = 0);
It would be nice to see a
The issue:
I would like to control the which headers are open, as to not get the menu scrolling far down.
In my situation they only need to be in one section at at time.
The text was updated successfully, but these errors were encountered: