Inc/Dec Button


I am a beginner and I’d like to stick to the VSTGUI if I can manage this - but it is hard to find good manuals / best practices:

I use the new WYSIWYG-editor, I have a button and a texedit-view with a numeric value (two decimals). Whenever I press the button, the value of the textedit-view should be increased by 0.01.

I have read that I should realize this via a sub-controller and I can potentially take the again-example by Steinberg. If I define a sub-controller class that reacts to a pressed button, how do I increase then the textedit-value?

Does anyone have an example for this (hopefully) simple case?

Thanks and have a nice day off tomorrow :slight_smile:

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 ( and don’t spam this message board as it is not framework specific.