Skip to content
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

Display nested categories in Properties Pane #1984

Open
jonnew opened this issue Aug 26, 2024 · 2 comments
Open

Display nested categories in Properties Pane #1984

jonnew opened this issue Aug 26, 2024 · 2 comments

Comments

@jonnew
Copy link

jonnew commented Aug 26, 2024

The [Category] attribute can be used to group common properties of an operator in the Property Pane of the IDE:

image

However, if the property belongs to a nested class, they are ignored.

image

I'm not sure if there is a way to extend categories into nested Properties or if its even advisable since it might cause visual clutter.

@jonnew jonnew changed the title Display nested categories in Properties Pan Display nested categories in Properties Pane Aug 26, 2024
@PathogenDavid
Copy link
Member

This is unfortunately not possible with the property grid control currently used by Bonsai.

The category entries are only added by SingleSelectRootGridEntry.CategorizePropertyEntries. As the name implies, it's only used for the root of the grid. All the GridEntry stuff is internal to WinForms, so we can't manipulate it either. (Even if we could, I'm doubtful that the underlying Windows control supports nested categories.)

I also briefly investigated the possibility of injecting our own dummy properties with custom formatting to signify nested categories, but as far as I can find the WinForms property grid doesn't allow tweaking the formatting of individual properties.

This is however something that'd be trivial with Dear ImGui, but that UI migration might be a long ways off.

@jonnew
Copy link
Author

jonnew commented Aug 27, 2024

Thanks for the response David! Yeah that makes complete sense. Not a big enough deal to spend any effort on especially if a long term goal is to replace winforms.

Thanks for looking into it and feel free to close unless you think it's useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants