Geometry movement lag

Bill Vlahos bvlahos at mac.com
Sat Jan 10 15:04:19 EST 2009


I have a row of icons and have been able to use the Geometry Manager  
to spread them out as the window is resized. However, I have another  
button and graphic that need to move and be resized to span the width  
of a subgroup of the icons.

The Geometry Mangers doesn't seem to be able to do this. It appears to  
move the object so the right sides align but doesn't resize it even  
though it is supposed to scale it with anchors of the two outermost  
buttons. It acts as thought it is positioning instead of scaling.

To get around this I put an on resizeStack handler that calculates the  
rects, lefts, and rights of various objects and then sets the rects of  
the buttons and lines.

This works but while the action of the objects being moved via the  
Geometry Manager is smooth, the action of the objects my handler does  
is jerky. Worse than just being jerky it sometimes doesn't get the  
final position correct.

Here is the code in the stack script:
on resizeStack
    set the itemDelimiter to comma
    put the rect of graphic "Line" into tRectLine
    put the left of button "Doctors" into item 1 of tRectLine
    put the right of button "History" into item 3 of tRectLine
    set the rect of graphic "Line" to tRectLine
    pass resizeStack
end resizeStack

Bill Vlahos



More information about the use-livecode mailing list