View smaller.

Malte Brill revolution at derbrill.de
Sun Apr 9 17:09:06 EDT 2006


Hi Ryno,

this is not completely thought through, but it helps to get you 
started. Ideally you store original dimensions in a custom property and 
use that. Also there might be cases where this fails (groups with 
lockLoc set to true) that need special treatment...
If you use many controls it might be slow. A list with all resizeable 
components and a repeat for each loop might be better then.

All that saied here is a script. For 25 % view use /4 instead of /2. 
Note that this only makes it smaller, not bigger yet. If you need more, 
please let me know.

on mouseUp
-- 50 % view
   lock screen
   repeat with i=1 to the number of controls
     put the top of control i into tTop
     put the left of control i into tLeft
     set the width of control i to the width of control i/2
     set the height of control i to the height of control i/2
     set the top of control i to tTop/2
     set the left of control i to tLeft/2
   end repeat
   put the topleft of this stack into tTopLeft
   set the width of this stack to the width of this stack/2
   set the height of this stack to the height of this stack /2
   set the topleft of this stack to tTopLeft
   unlock screen
end mouseUp

Hope that helps,

Malte


More information about the use-livecode mailing list