Geometry Manager
Peter Haworth
pete at lcsql.com
Fri Aug 31 15:24:30 EDT 2012
Thanks Jacque. I figure out most of it but hadn't thought about the ratio
idea.
I feel like I'm pretty much duplicating what the GM does except for the
ability to position controls relative to other controls.
Pete
lcSQL Software <http://www.lcsql.com>
On Fri, Aug 31, 2012 at 11:54 AM, J. Landman Gay
<jacque at hyperactivesw.com>wrote:
> On 8/31/12 12:41 PM, Peter Haworth wrote:
>
>> I'll write my
>> own resize stack handler to take care of it.
>>
>> Any pointers as to good techniques to do this? I have 1 control that
>> needs
>> to be scaled horizontally and vertically and a couple of others that need
>> to be re-positioned.
>>
>
> With only three controls it should be easy. The basic idea is to just go
> through everything that needs changing, calculate either the new rectangle
> or the new location, and set it. It's purely grunt work, tedious but not
> hard.
>
> For the most flexibility, use ratios when resizing. I usually figure out
> what the ratio is for a control in my original layout and then use that for
> the calcuation. I.e., if a field should be a third of the vertical size of
> the card, then the ratio is .33. Multiply the card height by .33 and put
> appropriate values into the other three points of the rectangle; then set
> the rect. It all depends on your layout. Sometimes the width will remain
> constant, sometimes not. Sometimes you always want the left at 0, sometimes
> not.
>
> Repositioning works similarly. You can either change the topleft, or the
> location, or some other point, or you can use a ratio to calculate the new
> position (one-third of the way from top, for example) and set the topleft
> to that. Or set the left to the left of another object, or use any other
> reference that should line up.
>
> I suppose that's vague enough to confuse. :)
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
More information about the use-livecode
mailing list