Q. about size of stack, substacks and cards

Jeanne A. E. DeVoto jeanne at runrev.com
Thu Oct 3 23:23:00 EDT 2002


At 5:23 PM -0700 10/3/2002, Alex Rice wrote:
>Seems like cards and stacks inherit their default size (width/height)
>from the parent stack or mainstack, correct?

True for cards, but not for stacks (a substack can be any size; it's not
dependent on its main stack's size).

>I have this strange situation where a mainstack has a bunch of cards in
>it, and added a menu using Menu Manager, after most of the cards were
>created. After I created the Menu, some of my cards have their size
>shifted by 22 pix, which I guess is the height of the menu group. In
>the first card the contents is shift -22 vertically, so the content is
>going off the top. On subsequent cards, the the height is +22 and
>creates a blank space at the bottom of the cards.

It's a consequence of the way cross-platform menus are handled. On Windows
and Unix, the menu bar appears in the top of the window. On Macs, it's
placed at the top of the window, but since it doesn't need to actually
appear there - since the Mac uses a separate menu bar - the stack is
resized and scrolled up so the group is hidden on that platform. That way,
the same stack can be used on all platforms without changes.

Check out the "editMenus" property in the Transcript Dictionary, and the
"About menus and the menu bar" topic, for more background on this.

(The next version of Rev will automatically place a menubar group created
with the Menu Manager on all cards, and I've added some
strategically-placed comments on this to the docs, so this should cause
less confusion.)

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list