How to create another window / canvas size function?

Hi, I am trying to create a button component where the user can click it and select another canvas/ window size for the plugin.
Does anyone know how to go about this feature? I am not talking about draggable resizable window.
For example, when the user clicks on the button, they can choose from small, medium, large, etc. and the window will change sizes based on it.

What have you tried so far?

Should be as simple as listening to when the button’s clicked and calling setSize() on your top-level component with the relavent size - have you tried something along those lines?

1 Like

I have not tried it yet because I am not the only person working on this project, but that is a good suggestion, only problem I am worried about is that once it is resized, all of my other components will stay same size though right? Is there a way to have a affect on resize for everything in the plugin?

If you change the size of a component, its resized() method will get called. That’s where you should be laying out your child components and so you should account for the parent’s size there.