I haven't needed to create menubars for some time, but this is how it has always worked in the past:

LiveCode menus are objects that take up room at the top of a card. On Windows, this is standard; menus appear at the top of each window. When the same stack is run on a Mac, LiveCode pushes the top portion of the card above the top border of the window, out of view. The body of the window shortens to accomodate only that portion of the card that contains the actual stack content. The card is still technically the same height, but the part of the height that contains the menu group is hidden from view. LiveCode handles this window resizing transparently between platforms.

When the menu scrolls out of view, the actual content area will be, in this case, 800 pixels high. The other 22 pixels are above the top of the viewable area. You do not need to set the menu group invisible because it won't be in view. While you are working it's convenient to not set the group as the system menu. That way you can see where placement of the controls should go relative to the area that will disappear later. When layout is done, set it back to be used as the stack menubar so it will behave as you want.

If the menu group is not placed on every card, those cards will not scroll and the full height of the card is displayed. If you place the menu group on every card so the size remains consistent everywhere, the redraw problem at the bottom of the card shouldn't happen.

If you have already placed controls under the menubar area, you'll need to move them down.

Menubar behavior on Mac is a little quirky but it does allow you to write once and run on any OS, which is what LC is all about. As long as you don't make the menu group invisible, the stack will look as expected everywhere.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On November 15, 2018 9:05:09 AM Terence Heaford via use-livecode <use-livecode@lists.runrev.com> wrote:

This post is regard the use of Livecode on MacOS(LC 9.0.1)


When you set the height of this stack to 800 (for example)


The height of this card in the property inspector is 822 and is also returned as 822 in script.


This seems to be as a result of the menubar position on none mac systems.


I have "set as stack menubar" checked in Menu Builder


When displayed on screen the card displays with a height of 822 not 800 even though the menubar is not showing in the window.


If you then position say a button for example within the lower 22 of the card remnants of the button can be seen on other cards when you go to another card.


How is this supposed to be dealt with in Livecode.


It all seems rather confusing to me.


It is usual on a Mac to have a 20 border to the edge of windows etc. As stated above if you do this then parts of the buttons
for some reason show on other cards (22 - 20).


Livecode should simply identify you are on a Mac and the 22 for the menubar should be dealt with in Livecode code rather than leaving it
to the scripter to sort out.


On a Mac if you set the stack height to 800 then the card should default to 800.


Why can’t the menubar be stored by some other means?


End of part rant.








Thanks


Terry










_______________________________________________
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to