Geometry Manager

Bob Sneidar bobs at twft.com
Fri Aug 31 16:27:33 EDT 2012


Can you lock messages prior to resizing and unlock them afterwards? 

Bob


On Aug 31, 2012, at 12:52 PM, Peter Haworth wrote:

> Just came across a little problem with this.  Assuming the dictionary is
> correct, the resizeStach message is sent when a stack is resized via script
> as well as when the user resizes it.  I have a circumstance where I resoze
> the stack by scriopt but do not want the control resizing to happen.
> Strange but true!
> 
> First thought is to set some sort of global or cprop to indcate to the
> resizeStack handler that it shouldn't do anything.
> 
> 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>
>> 
> _______________________________________________
> 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





More information about the use-livecode mailing list