J. Landman Gay
jacque at hyperactivesw.com
Wed Dec 29 00:42:44 EST 2004
On 12/28/04 9:39 PM, Chipp Walters wrote:
> Muchos Gracias to Senor Gaskin!!!
> For those of you who've come lately to this, the problem was simple. How
> to add menus for both Mac and PC to an existing stack *without* ever
> resizing the existing stack.
> As you all probably know, the minute you add a menu to a stack, it's
> height is recalculated whenever it opens on a different platform. The
> reason is that the menubar is 'on the card' for the PC, but at the top
> of the screen for the Mac. So, when viewing the stack on the Mac, the
> stack is automatically reduced in height by the amount of the menubar
> (thus screwing up my carefully rendered screen layout;-).
> bummer, especially if you don't want this behavior.
> So, Richard's idea was pretty straightforward:
> set the editmenu property of the stack to true
> hide the menu group
> So, here's how it works: When the stack is opened up on the Mac, because
> the editmenu prop is true, the menus appear at the top of the card and
> not in the menubar. But a little known fact (only Richard knows it
> apparently as it's not documented) is that the menus will appear in the
> menubar if the menuGrp is hidden! So, just hide the group and then show
> it if the platform is Win32.
> Works like a charm...and no resizing of the stack whatsoever.
> Cool, and thanks Richard!
I've got a detailed explanation of this in my HyperCard-to-Rev tutorial
too, in particular:
Scott Raney always stressed that if you plan to deliver on both Mac and
Windows, you should always put your menu bar in very early in
development. Plan for the scroll behavior on Macs. The tutorial suggests
another (more standard) way to solve the problem, though it may have
messed up your existing geometry:
If your geometry measured the locations of all objects from the bottom
up rather than the top down, then the above method would have worked too.
There's also a script in there that will move all the stack objects down
and make room for a new menubar. Since I port over so many HyperCard
stacks, I use this technique a lot.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode