@prehm there's been a few posts floating around on the topic of panels lately. Hypothetically the panel can store both UI and control data. In practice, for control data, it is best to use another component and reflect UI changes in the panel. So in your case, maybe try using a hidden knob for your four-button state, and using mousecallbacks and a paint routine on the panel to interact with and change the state of the knob.
You could bypass the knob altogether, I sometimes find issues with it when trying load presets or initialize the project. Really depends on what you are trying to do though.
Link Preview Image
saveInPreset not working for panel data?
@VirtualVirgin You could do it like this which might make it seem like it makes more sense const panelObj = Panel1.getValue(); Console.print(panelObj.test1);
favicon
Forum (forum.hise.audio)
Link Preview Image
Is panel.data persistent?
I thought it was, but this snippet seems to show otherwise. HiseSnippet 984.3ocsVstaaaCElxwpq1asXEnO.B5WJaFAVdtNdscXcwIY0aKIF0YA6eELTGGSDIRAR5rYTzm08Jr2fsC0k...
favicon
Forum (forum.hise.audio)