Open jonnew opened 3 weeks ago
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.
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.
The
[Category]
attribute can be used to group common properties of an operator in the Property Pane of the IDE:However, if the property belongs to a nested class, they are ignored.
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.