Resizeing stack proportionally

Sarah Reichelt sarahr at genesearch.com.au
Wed Apr 3 17:16:00 EST 2002


Store the topLeft of the stack before setting the width, then restore it 
afterwards.
Here's what I used (without any or your image stuff):

on resizestack
   put the topLeft of this stack into tL
   lock screen  -- so people don't see the window moving
   set the width of this stack  to the height of this stack/100*133.33
   set the topLeft of this stack to tL
end resizestack

It is still a bit odd in that you release the mouse button and the 
window then does things of it's own accord, but it keeps the window 
anchored in the same spot while constraining the proportions.

Sarah


On Tuesday, January 19, 2038, at 01:14  pm, malte brill wrote:

> on resizestack
>   set the width of stack "main" to the height of stack "main"/100*133.33
>   set the rectangle of image "back" to the rectangle of stack"main"
>   set the location of image"back" to the width of stack"main"/2,the 
> height
> of stack "main"/2
>   pass resizestack
> end resizestack




More information about the use-livecode mailing list