auto window resizing?

davidestevens's icon

I've been building a patch on my MacBook that is going to end up on an iMac. I just tried loading it up on the iMac and of course the screen size is different.

Is it possible to resize (using zoom commands?) windows to fit a differently sized screen? How does anyone else deal with this? (Apart from manually resizing everything that is!)

thanks

David

Luke Hall's icon

The [screensize] object and then messages to [thispatcher] might be the way to go.

lh

davidestevens's icon

I was thinking something like that, but I couldn't find any "zoom" type messages to thispatcher. And I also found that the regular zoom function is for edit mode only (ie not Presentation mode). So I was wondering if there was something else that I'd missed. I want the whole UI (all the different windows), including all the user interface objects, to resize to fit the screen. My assumption is that this means zooming ....?

David

Luke Hall's icon

You can use the interpolation features of [pattr] to zoom between two settings but I don't think there's a [thispatcher] way of changing the zoom. Here's a patch that was posted here a while ago, I can't remember who posted so apologies for not giving credit.

lh

192.resizable_interface.zip
zip
davidestevens's icon

Thanks for that. Interesting - I'll have a proper look once I've finished with the sequencer rebuild I'm in the middle of!

David

pid's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Luke Hall's icon

I stand corrected, good to know.

lh

davidestevens's icon

Cool - that will do the job with a bit of querying the screen size.
Thanks for the heads up.

David

pid's icon

yeah, but the other example that you uploaded luke was really interesting and i had not seen it before, so thanks.

MOJO's icon

When I try to use zoomfactor it says its not recognised by thispatcher. Does anyone know why its not working?

seejayjames's icon

my God. When was that added?? Max just upped the bar in a big way. Not being able to zoom the patch easily was one big advantage that Flash has that I felt was sorely missing from Max. Holy cow. Also I thought it wasn't available in the Runtime or in a standalone app, but it works.

You can also do some auto-scroll magic with javascript:

this.patcher.wind.scrollto(X, Y);

so between the two, and the screensize object (or jit.displays which has a really fun help patch), you've got all kinds of control.

BTW the "resizable interface" patch was mine, glad you liked it :) BUT, the whole reason I did it was because I didn't know you could do it this way. Soooo much easier. (Though the "pattr bindto attributes" idea is interesting for lots of other things too... I don't know whether it can bind to all attributes though.)

@mojo, not sure, maybe your version is older and doesn't support it. Works here on 5.1.0.

Adam's icon

Hi,

Any chance someone can help me with doing the same thing using 'resizable interface' but with one bpatcher inside a patch, having a little trouble getting my head round it! Any help will be appreciated.

Thanks,

- Adam