Issues with the WYSIWYG Editor in VSTGUI (ViewSwitchContainer-StringListControl)

Issues with the WYSIWYG Editor in VSTGUI

Hi everyone,

I’m encountering some issues with the WYSIWYG editor, and I’m hoping someone here might be able to help. The main problem is that what I see in the editor doesn’t align with what I get after saving and reopening. Here are the details:

Issue 1: String List Control Counting

This issue isn’t major but still worth mentioning. I’m trying to create a string list control for selecting MIDI channels. By default, the control counts from 0 to 15, but I’d like it to count from 1 to 16 instead.

I’m using a control tag with a string list of 16 values (MIDI Channel 1 to MIDI Channel 16). While the editor displays everything correctly when I modify it, after saving and reopening the UI, it reverts back to counting from 0 to 15.

Here’s a screenshot for reference:


Issue 2: Viewswitchcontainer Not Saving

This one is a major issue for me. I need to create a viewswitchcontainer to switch between 16 view containers, one for each of my MIDI channels.

The problem is that whenever I add views to the viewswitchcontainer and save the project, the views disappear when I reopen the host. I can’t find any information online about how to set up a viewswitchcontainer properly.

So any child added to the viewswitchcontainer like the two viewcontainers here would disappear:


Questions

  1. How can I make the string list control count from 1 to 16 and retain this setting after saving and reopening?
  2. What is the correct way to set up a viewswitchcontainer so that it retains the views I’ve added?

I apologize if I’ve missed any relevant resources in the forum. I’ve tried searching but couldn’t find anything addressing these specific issues. Any help or guidance would be greatly appreciated!

Thank you in advance for your support!

Hi,
if you connect a control via tag to a parameter of your VST3 plug-in, then the parameter always sets the range of the control. The parameter would need to be setup that it is in the range of 1 to 15. Out of my head, I don’t know if this is easily possible with a VST3 string list parameter out of the box.

The ‘viewswitchcontainer’ switches between templates. So you need to create different templates and name them in the template-names attribute. So for example you create a template named A and a template named B, you setup the template-names attribute with A, B.