Automatically Resizing of UI Object

Sym's icon

Hey, I'm writing some analysis tool at the moment and want to resize the UI Objects (scope) to work automatically with the resizing of the window.

At the moment I figured out the best way would be to get the Size of the window from thispatcher and change the UI Size Parameter based on this.

Is there another way to achieve this? At the moment I'm also triggering the fetching of the size with a constant bang.

Thanks for your help!

seejayjames's icon

Sounds like a good way to me, unless you eliminate the ability to resize the window using the standard controls and implement your own within the patch. Then you'd know exactly when it's been changed.

I think you could bang about every quarter second or so, rather than continuously. Test and see the response while changing the window. Not sure if there's a way to "watch" the values to only poll them when they've been changed. You should, however, put the values through [change] before going to actually resize the UI objects, as there's no reason to constantly "resize" them to the same size (not to mention this is processor-expensive). Maybe you have that part already.

Sounds like a cool idea!

Sym's icon

Hey, thanks for the input of eliminating the ability to resize the window with the standard controls. Haven't though of this yet! I might just implement a few window size presets.