] On Behalf
Of Sean Cole (Pi) via use-livecode
Sent: Friday, October 08, 2021 5:31 PM
To: How to use LiveCode
Cc: Sean Cole (Pi)
Subject: Re: Keep stack proportions when resizing
on resizeStack
send "ratioSet" to me in 0.01 sec
end resizeStack
on ratioSet
lock screen
put the topleft of
on resizeStack
send "ratioSet" to me in 0.01 sec
end resizeStack
on ratioSet
lock screen
put the topleft of this stack into tTL
set the width of this stack to the height of me * 1.78 -- Ratio 16:9
set the topleft of this stack to tTL
unlock screen
end ratioSet
I had a similar request from a client a few years ago. We couldn't find
any apps from the 21st century that do that, so instead we opted for
what we see in apps from Apple and many others:
We leave the user in control of their desired window size, and adjust
our media in the content region
Thanks Devin, I’ll try these out.
I’m seeing that the resizing process is not going to be visually smooth, so I’m
content at present to have something that does the job in chunks or at the end
of the resize.
Peter
> On Oct 8, 2021, at 4:56 PM, Devin Asay via use-livecode
> wrote:
>
>
Peter,
I asked this question several years ago and what I gathered is that it’s not
easy because window resizing is under the control of the operating system, and
LiveCode can’t really override it.
My attempts were not completely satisfactory:
I have a stack that I want to constrain to a 4:3
Does anyone have a script to keep a stack’s proportions constant when the user
is changing the stack size by dragging the lower right corner? This is a stack
with a control containing a video or image. I’ve used the geometry manager for
the objects within the stack but the stack itself needs to