GUI resize VST3 vs VST2

Hi audio plugin experts !

I did an audio plugin (to be used solely in Reaper) that provides a rather big and resizable GUI.

I am already rather up to speed with designing that GUI, which mainly consists of a huge vertically and horizontally scrollable grid (table) within a tabsheed, which is supposed to automatically resize to fill the window the DAW provides for it.

This works great when compiled to a standalone. (Very happily the JUCE library automatically provides this “Standalone” wrapper for plugins. THANKS A LOT !)

It also works perfectly right out of the box when compiled to a VST3 and loaded in Reaper.

But when compiled to a VST2, the GUI I designed does not resize, but stays at the initial size, and sits “behind” the Window the DAW provides for it. If that window is big, my GUI sits in the left top corner. It the window is small, someone (supposedly the DAW) provides vertical and horizontal scrollbars. This is usable, not the intended behavior. I want the scrollbars just for the grid (i.e.within the tab sheet, and automatically provided by the JUCE Table componemnt) - as perfectly working with a VST3, i.e. my GUI auto-adapting to the window.

I do know that this is not a shortcoming of Reapers, as - while I did find several VST2 plugins that behave in the same way - I also found multiple VST2 plugins that behave in the way I’d like to see,

Is there any way to have my GUI in VST2 detect the size of the parent window and resize automatically to exactly fill same ?

I found that adding
setResizable(true, true);
Works, but not really as nice as with a VST3, as you still can resize the surrounding Window separately.

Thanks for any hints,

Resize functions &

Start time 20 ms

Then check if the sizes are the same if not execute code.

However, the resize method should automatically resize the bounds.

Meaning is you set a Juce::rectangle<int bounds = Juce::rectangle(get local bounds); or get parent bounds it should resize automatically.

If that doesn’t work I would do a timer with a check versus the constrainer or rectangle and the local bounds.

It works rather nicely, nut not as perfect as the VST3 from the same source code.
Normally the difference is minimal, You only can “separate” the Frame provided by the DAW from the JUCE GUI window by carefully selecting a point at the border, hence selecting the outside frame instead of the inside window, and dragging the frame outside, leaving the window behind.
Also sometimes they start out of sync. Her e a timer could help…
It would be great if the JUCE library would provide this out of the box. If possible it should completely hide the difference between VST2 and VST3.

I have the same problem.
VST3 is working fine, but for VST2 I can separate the “DAW frame” from the size of my plugin.

I tried a timer. But it did not help. Because getParentComponent()->getLocalBounds() does not give me the bounds of the DAW frame, unfortunately. (I am am calling this inside my AudioProcessorEditor.
I also tried getTopLevelComponent(). But same thing: does not give me the bounds of the DAW frame.
Therefore I cannot detect, if the DAW window is resized to a larger size than my plugin.

Maybe I am doing something wrong?

As a disclamer, I’m not as familiar with VST2 as I am with newer formats so I may be mistaken, but I don’t think the VST2 API has (official) support for host-initiated resize. The plugin client is able to request a new editor size from the host - however, as far as I can tell, the host is not able to request that the editor update its size.

As a workaround, you can add a corner resizer to your editor with setResizable (true, true). This will allow you to use client-initiated resize. Alternatively, if switching to VST3 is an option, then this format supports both client-initiated and host-initiated resize.

I suppose Reaper is inclined to adapt the size of the frame it provides to the size of the window the VST2 GUI shows. I don’t know how this is communicated, but is seems to work very well, if you grab the corner resizer provided by JUCE on request.

Yeah, the corner resizer is working for me.
Was hoping to get rid of it.
But maybe that’s not possible. Hmmm…

But maybe that’s not possible. Hmmm…

Seem no problem with VST3.

Yep, same here. No problems with VST3.
But with VST2 I unfortunately get the same problems you described above.