window resizing and repositioning controls

Richard Gaskin ambassador at fourthworld.com
Thu May 15 14:36:01 EDT 2003


Chris Sheffield wrote:

(resuming the standard top-to-bottom reading order):
 
> --- Richard Gaskin <ambassador at fourthworld.com> wrote:
>> Chris Sheffield wrote:
>> 
>>> This is somewhat related to the recent post about
>>> resizing the window on the Mac when the menu bar
>>> changes.  I've made it so my stack will resize
>>> itself to the correct size on the Mac, but now all
>>> my controls are in the wrong place because the
>>> menubar that was there on Windows is not there
>>> on the Mac.  My window resizes from the bottom,
>>> and my controls remain where they are.
>>> 
>>> So my question is this:  is there an easy way to
>>> reposition all controls on all cards at runtime
>>> and do it quickly?  Does anyone have a script for
>>> that?  Or am I just doing something wrong and
>>> shouldn't have this problem?
>> 
>> You should not need to move controls at runtime.
>> The card is the same size on both platforms, just
>> with a menugroup the stack is clipped at the top by
>> the height of the menugroup.
>> 
>> In your resizeStack handler, use "the height of this
>> cd" rather than "the height of this stack" and you
>> should be fine. 
>> -- 
>> Richard Gaskin 
>
> I'm not sure I understand.  Are you saying I should
> have a resizeStack handler that sets "the height of
> this stack" to "the height of this cd"?  If so, that
> didn't work.  I put it on my Mac and the stack window
> kept growing and growing.  I finally had to abort the
> script.  Maybe I did something wrong?

Your original post said you "made your stack so it will resize itself", and
asked how to dynamically adjust the positions of controls to accomodate the
menu group.  I said you should not need to do that; you need no resizeStack
handler to handsle the menu group, but if you already have one as your
originally described then you'll want to do any calculations based on the
height of the card (which does not change) as opposed to the height of the
stack (which is changed for you automatically to accommodate the menu
group).

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list