the menuBar and the EditMenus

Kay C Lan lan.kc.macmail at
Fri Apr 11 12:15:19 CEST 2014

I'm no expert with cross platform design, but, I thought the specific
purpose of the editMenu property was so you can see and edit your menu if
you need to. This should only be used whilst in the IDE; it should be false
in your standalone.

As for the 30 pixels, which I've seen reported as 27 elsewhere, lets say
you have a stack which is 827 pixels tall. On a Windows standalone you must
have the Windows menu at the top of the stack, so that takes up 27 pixels.
So your actual stack height available to you to put your own buttons and
images etc is only 800 pixels high.

Now on the Mac side, you set the menubar property to the name of the group
which is your Mac specific menu. What this does is displays your Mac menu
at the top of the screen as is normal for Mac. Now if nothing else happened
you'd have 27 pixels of blank space (or Windows menu, I'm not sure which)
at the top of the stack window, which would be wrong. So to fix this LC
automatically hides the top of the stack that would normally be reserved
for the Windows menu.

Yes LC has behaved like this for a very long time. How would you propose to
have a stack with a workable height of 800 pixels, and then include or
exclude the menubar in the stack depending on OS, without adjusting the
height of the stack?

I think the trick is, if working on Mac, is to create your Windows version
first; i.e. set up your stack with a basic Windows menu, then place your
first couple of controls below these. Then create your Mac menu and try
setting the menubar property. It should then all make sense. Your users
should never know because they'll never see the resize.


On Fri, Apr 11, 2014 at 6:50 AM, Graham Samuel <livfoss at> wrote:

> I'm still having a strange time with these two entities in a desktop Mac
> app which is also designed to work on PCs. All I'm trying to do is to have
> a Mac menu at the top of the screen, i.e. in the normal place for Macs, but
> NOT to have the stack size altered compared to the PC version, where the
> menu bar will be at the top of the window. This doesn't seem to work for
> me, certainly not in the IDE. If I want my menu active in the Mac version,
> it seems I must set the editMenus to false, which triggers the engine to
> change the size of my stack (it takes 30 pixels off the height).
> What I want to do is to set a group to be a menu bar (set the menuBar of
> this stack to "myMenuGroup"), but also place it at the top of the window
> where the PC version will use it, and then simply hide the PC version of
> the menu if I'm not running on a PC. I do not want the stack size to
> change. However, within the Mac IDE, unless I set the editmenus to false,
> the IDE will not display my menu but will just continue showing its own
> one. I don't think this used to happen, but I can show it happening now.
> This augurs badly for the eventual standalone.
> Is anyone else trying to develop a cross-platform (Windows and Mac) app
> where the window (stack) size stays the same on both platforms? FWIW I'm
> using LC 6.6.1 Commercial on Mavericks 10.9.2 - though the problem seems to
> have existed for some time.
> I guess I did something wrong, but I now have a very simple test stack
> that shows the above behaviour, so unless there is a trick, I may have to
> code my way out of the problem by forcing the stack size to change back
> after editMenus is set.
> Has anyone got a better solution?
> Graham
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list