Location of stack

Sarah Reichelt sarah.reichelt at gmail.com
Sun May 16 06:45:23 EDT 2010

> Alternatively, is there a way to know in advance how much to twiddle the
> vertical location by? It's 12 in my system, and I assume that's half the
> height of the non-existent menu bar, but I expect that varies depending upon
> the screen resolution or something-or-other, just as it would under Windows.
> There really ought to be a clean way to get a program to remember its window
> location without momentarily appearing at the wrong location whenever it's
> opened.

Yes, once the menu bar is visible, check the height of the stack and
the height of the card. I can't recall exactly now, but they are
either 24 or 26 pixels different, so if you are using the loc, then
you need to allow for half of that.
If your routine checks these 2 heights, if they are the same, then the
menubar has not yet been drawn and the fudge factor needs to be
applied, but the fudge is consistent.

> It surprises me that the menu causes problems on the Mac (including all the
> weirdness about menu items being moved around) that don't occur on Windows,
> given that Rev is descended from Hypercard, a Mac program.

Descended fro Mac OS < 10 via Unix.


More information about the Use-livecode mailing list