Need Help with Geometry

Ken Ray kray at sonsothunder.com
Mon Jun 28 19:30:43 CDT 2010


> Not quite sure how to set the Geometry manager to get the results I want.  I
> have two fields that are the exactly same size with one siting above the other
> and their left edges aligned.  I'd like them to scale proportionately both
> width-wise and length-wise to the lower right, keeping the vertical distance
> between them constant.  In other words, I want the two fields to get bigger or
> smaller together and keep the same distance apart.  Thought it would be easy,
> but I've tried many different combinations of settings in the Geometry manager
> with no luck.  Any advice would be most appreciated.

So should the topLeft of the topmost field stay in the same place as you
resize? Just trying to understand...

For example, if you start with two fields that are 100 pixels wide by 50
pixels tall with 10 pixels between them, and 10 pixels from the right edge
of the fields to the right side of the card, and 10 pixels from the bottom
edge of the bottom field to the bottom of the card, and the starting height
of the card is 500, and the starting width of the card was 400, that means
that the topleft of the topmost field would be at
(400-110),(500-(50+50+10+10)) or 290,380 and the topleft of the bottom field
would be at (400-110),(500-(50+10)) or 290,440.

If you then resize the stack to make it 100 pixels wider and 100 pixels
taller, then that would leave the top field's topleft at 290,390, both
fields would be 50 pixels taller (splitting the difference between the two
of them and maintaining the 10 pixel gap), so the bottom field's topleft
would be 290,(600-(100+10)) or 290,490... is that right?

Just checking...


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/






More information about the use-livecode mailing list