Resizing windows and scaling interior accordingly!


#1

Hi,

When I resize my window only the positions of the buttons I have declared are moving/being scaled.

I also have a console window (as Haydxn has supplied in his tutorial) and an OpenGl canvas which makes my plug-in crash when resizing window. Is there something special I need to do in order for these two components to be allowed resizing?

I have compared my code to the JuceDemo code and can’t seem to find anything missing :frowning:

Happy new year :slight_smile:


#2

…well yes, components don’t magically scale themselves - you’d need to resize them in your resized() callback, to keep them in the layout you want. If you use the jucer it’ll generate that kind of code for you, but it’s pretty simple to do it manually.

If the crash is a juce problem, and not just a bug in your app, please let me know more about it…


#3

[quote=“jules”]…well yes, components don’t magically scale themselves - you’d need to resize them in your resized() callback, to keep them in the layout you want. If you use the jucer it’ll generate that kind of code for you, but it’s pretty simple to do it manually.

If the crash is a juce problem, and not just a bug in your app, please let me know more about it…[/quote]

Hi Jules and thanks for your comment!

I’m familiar with the resized() callback and have used it the same way that you are in the JuceDemo; as I wrote the buttons are updating correctly when changing the window size so I must be close.

Will try to look at my code once again…

Thanks again


#4