On 20/1/10 19:51, Richard Gaskin wrote:
PS: a real time-saver for me in writing resizeStack handlers has been
this SetRect command:
My slightly different approach is a couple of ugly commands adjustObjectPosn
and adjustObjectRect (below), which allow the layout of a bunch of controls to
be described like this:
on resizeCard
adjustObjectRect "grc", "TabBacker", "this card", "", "-,-,R+1,-"
adjustObjectRect "fld", "Report", "this card", "", "-,-,R-20,B-40"
adjustObjectRect "fld", "FTPlog", "this card", "", "-,-,R-20,B-40"
adjustObjectPosn "grp", "FTPlogCons", "fld", "Report", "L,B+6,-,-"
adjustObjectPosn "btn", "ToggleWrap", "fld", "Report", "-,B+6,R,-"
adjustObjectRect "fld", "FTPprogFld", "btn", "ToggleWrap", "-,-,L-2,-"
end resizeCard
That is, the commands let you set the position or rectangle of one control,
relative to another control or the card, by specifying new values for any/all
of the four edges those specifications in the form of expressions which
can include the loc (X, Y), dimensions (W, H), or rect (L,T,R,B) of the
reference control.