Keep stack proportions when resizing

Ralph DiMola rdimola at
Fri Oct 8 18:40:18 EDT 2021

resizeStack has 4 parameters that can be very useful.

resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at] 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 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
use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the use-livecode mailing list