Stack Height/Menubar

J. Landman Gay jacque at hyperactivesw.com
Sun Nov 18 12:58:58 EST 2018


Scripts can move locked controls, so you won't have to worry about that. If 
the groups are shared (background groups) their content will move with them 
and the script won't touch those buttons. It will also move card groups, so 
you may need to check for the content controls in that case.

You were right that if you know there will be a menubar it should be placed 
first, or at least space should be reserved for it. I made the same mistake 
the first time.

--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On November 18, 2018 11:31:32 AM Rick Harrison via use-livecode 
<use-livecode at lists.runrev.com> wrote:

> Hi Jacqueline,
>
> Thanks for pointing out this routine.
>
> I have some modifications I need to
> make to it though.
>
> I have to check to see if any items
> are locked, and unlock them before
> changing the location and then
> re-lock them after the change.
>
> The number of controls also includes
> groups which are made up of buttons
> so I will have to modify my calculation
> there.
>
> I also read your informative links to
> the other menu tutorials.
>
> Thanks,
>
> Rick
>
>
>> On Nov 18, 2018, at 12:58 AM, J. Landman Gay via use-livecode 
>> <use-livecode at lists.runrev.com> wrote:
>>
>> On 11/17/18 12:49 PM, Rick Harrison via use-livecode wrote:
>>> Does anyone have a nice routine which
>>> will compensate for the change in layout
>>> by moving all other objects farther down?
>>> I thought I saw a mention this before.
>>
>> on pushDown
>>  repeat with x = 1 to the number of bgs
>>    set the top of bg x to the top of bg x + 22
>>  end repeat
>>  repeat with x = 1 to the number of cds
>>    go cd x
>>    repeat with n = 1 to the number of cd parts
>>      set the top of cd part n to the top of cd part n + 22
>>    end repeat
>>  end repeat
>> end pushDown
>>
>> This is from a HyperCard-to-LC conversion tutorial. "Parts" is a HC synonym 
>> for "controls", which you can substitute if you want. The default menubar 
>> height used to be 22, but change that number if you need to.
>>
>> Tutorial covering menus is here:
>> <http://www.hyperactivesw.com/mctutorial/rraboutMenus.html>
>> And the above handler is here:
>> <http://www.hyperactivesw.com/mctutorial/rrcreateMenus.html>
>>
>> --
>> 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
>
>
> _______________________________________________
> 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