Keep stack proportions when resizing

Ralph DiMola rdimola at evergreeninfo.net
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 evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] 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 lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list