[TIDBIT] A resizeStack button

FlexibleLearning at aol.com FlexibleLearning at aol.com
Fri Jul 22 07:28:27 EDT 2005


A tidbit for your Scripter's Scrapbook:
- How  to use a button to resize a stack

Put this in the script of a button  called "resizeMe", placed at the 
bottomRight of your stack...

on  mouseMove
if the mouse is up then pass mouseMove
put the  topLeft of this stack into tTL
put globalLoc(the mouseLoc) into  tML
put max(the minWidth of this stack + item 1 of tTL,item 1 of tML)  \
into item 1 of tML
put max(the  minHeight of this stack + item 2 of tTL,item 2 of tML)  \
into item 2 of tML
set the rect of  this stack to tTL,tML
end mouseMove

and this in your stack  script...

on resizeStack
set the bottomRight of btn "resizeMe"  to the bottomRight of this card
end resizeStack

-----

/H
The  Scripter's Scrapbook
www.FlexibleLearning.com/ssbk.htm  




More information about the use-livecode mailing list