stack not specified height (from using editmenus?)
J. Landman Gay
jacque at hyperactivesw.com
Fri Mar 6 14:53:45 EST 2015
On 3/6/2015 10:38 AM, Dr. Hawkins wrote:
> I set, and later unset, editmenus, which may be triggering this.
> I now have a stack (OSX) which reports a height of 240 (which it should, it
> was set in a script),
> yet fullly shows a button with a bottom of 258.
> Experimenting shows that vertical 0 is at about the top of the titlebar,
> not the bottom of the titlebar.
> This wasn't the case until a couple of days ago; I have "show more" and
> "show less" buttons that use the bottom of the other to set the height of
> the stack.
> Could my experimenting with editmenus have done this? setting that to true
> and back to false doesn't solve the problem.
No, it isn't editmenus, it's that you assigned a menu bar to the stack.
What you describe is normal and expected behavior on Mac (only.) When a
menubar exists, the content is scrolled up by the height of the menu
group. The 0,0 point is still at the top of the stack, but that is
hidden out of view. The stack *window* gets shorter because the menu
group is off the top of the visible area. When you set editmenus to
true, you are removing (temporarily) the scroll so that you can see the
actual menu group.
This comes up so often that I think I should do a separate page on my
web site about it. For now, there's an explanation here:
The relevant quote from that page:
"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 Macintosh, 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
One thing for HyperCard users to remember is that what appears to be
coordinates "0,0" on a Mac screen will really be more like "0,26",
because the first 26 pixels contain the menu group hidden under the top
of the window. Any scripts that work with card coordinates need to
account for that."
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode