How to add scrollbar to plugin

I'm sure this is probably pretty easy but what would be the correct way of implementing a scroll bar in a plugin?


I tried creating a viewport member object in my AudioProcessorEditor, then add AudioProcessorEditor to the viewport like this:


but this either causes nothing to happen or crashes.


On the other hand  could implement my own scrollBar class, but that seems quite complicated; probably I'm missing something basic here. I could not find any viewport example in the JuceDemo... 

thank you!

I think you've got the right idea, but the implementation maybe is a bit off. Specifically adding 'this' to another viewport.

As your PluginEditor.cpp - simply make the viewport.

Now in the introjucer, create a new Gui file and create your gui there - then within the plugineditor/viewport component, set the content via the introjucer.


This should do it - but I have not tried it to confirm.