I have built a complex control system for a scientific instrument. Settings are implemented as Param objects, with one Parameterized class for each component of the instrument. Settings are displayed in a UI using Panel, which serialises and sends settings to the instrument.
Some components now have dozens of settings and I would like to make the UI easier to use by grouping the settings for one component into UI group-boxes, or sections with titles, or into an accordion.
I know I can use precedence to order the settings. I know I could break each component’s settings into multiple child Parameterized objects, but this would be a huge change and would give me other problems with my custom serialisation.
I found that I could add any Python object to a Parameterized, so I added a dictionary of groups. I then tried to add the settings in each group to the UI, but this didn’t work because that subset of settings was not a Parameterized.
I also tried adding all the settings multiple times to the UI, each time setting the precedence to -1 for those that were hidden in each group. But this just showed only the last group, because the precedence was being overwritten each time.
Please does anyone know of a way to group the settings in a Parameterized class in the UI, without breaking it into a hierarchy of settings?