If I had time to work up the example for you, I would but I am soaked with work now. And, yes the sub-controller is the cleanest way to do this.
If you want a tutorial on sub-controllers, you can always leverage off of my ASPiK Documentation. The example I use involves linking two knobs together and includes a button for the linking operation; after linked, the two knobs turn when you move one of them, and they deliver their value changes properly and independently, as if the user had two mice and was turning both at once. This shows how to use one control’s value to alter another control’s value/appearance.
You should be able to adapt that code, or at least learn from it, to create your own sub-controllers.
For the link above, if you are not using ASPiK, then you can safely ignore the “Registering the Subcontroller” part.
The PluginGUI object is my GUI encapsulation and uses multiple inheritance with VSTGUIEditorInterface, among others. That should correspond to your GUI object or the AGain example’s VST3Editor object, and you should see the same named functions there, since most are overrides.
The custom-view + sub-controller paradigms together are major strengths of VSTGUI4. If you learn how to use these concepts, you can do anything with VSTGU4 that you can imagine.
If you have any questions about the ASPiK-specific stuff, please use my Forum (https://www.willpirkle.com/forum/) and don’t spam this message board as it is not framework specific.