Resizing items in a group
Posted: Sun Jun 08, 2008 12:51 am
I want to update a certain rectangle graphic (knob) whenever the group resizes. So, in the group script, I wrote a reziseControl method that looks like this:
The only problem is that the group tries to resize itself after the rectangle inside of it resizes. I tried resetting the group's rectangle back to grploc at the end, but the rectangle inside the group seems to have moved by then. How can I stop the group from changing size when the rectangle resizes?
Code: Select all
on resizeControl
put the rect of me into grploc
put the width of me into grpwidth
put the height of me into grpheight
put (item 1 of grploc) + (grpwidth * .25) into pt1
put (item 2 of grploc) + (grpheight * .15) into pt2
put (item 3 of grploc) - (grpwidth * .25) into pt3
put (item 4 of grploc) - (grpheight * .6) into pt4
put pt1,pt2,pt3,pt4 into newloc
set the rect of graphic "knob" to newloc
end resizeControl