Popup Stacks: How to Handle Them
The short answer seems to be: to prevent their scrolling (at least in Mac OS9), the height of the stack must be set to greater than or equal to 260 pixels, and less than or equal to the screen height minus 36.
Moreover (this is the part that was somewhat vexing to figure out), this
height must be set BEFORE the
popup command is given. That is, setting the
stack's height in a
preOpenStack handler of the stack itself will not work
(1) Metacard's decision about whether the popped up stack is or is not of a height that needs to scroll seems to be made before theMy experience is that it works best to set the popping stack's
preOpenStackmessage is generated; and
(2) a stack height set in a
preOpenStackhandler will not persist after the popped up stack has disappeared--so problem #1 will recur the next time you pop it up (see note below).
resizableproperty to false, thus making its
maxHeightsettings irrelevant. When this was not true I got strange results.
Note regarding (2): If a stack's
preOpenStack handler sets that stack's
height, the effect of that command differs depending on whether the stack is
opened with a
topLevel command or a
popup command. With a
the height is set "permanently," i.e., until you do something to change it.
popup command, the height is set "temporarily," i.e., the next time
you pop it up or
topLevel it the stack's height will be what it was before
you tried to set it in this
I hope these results may be found useful by others, and look forward to any corrections to them that others may discover.
on 11/3/02 11:14 AM, I wrote: >
> Does anyone understand how Metacard handles the size, positioning, and
> scrolling behavior of stacks when they are shown using a Popup command? For
> -- the objects in a popped up stack scroll up or down under circumstances
> that I cannot quite specify. It seems to happen when Metacard thinks the
> stack too tall for the screen, so it truncates a bit of the image and leaves
> a gray area that, when a depressed mouse enters it, causes the stack's
> objects to scroll.
> -- if I set the height of a stack, and then open it with a popup command,
> Metacard sometimes changes that height. This certainly happens when the
> height exceeds the screen's height, but also happens in other cases. The
> "maximum height" and "minimum height" properties also get adjusted.
> These behaviors may well be useful, but I need to know what to expect. I
> would like to pop up a panel whose position and height I can specify and
> whose controls will not scroll. Is there some height range within which I
> can do this?
> Many thanks.
> David Epstein
Posted 11/14/2002 to the MetaCard List (See the complete thread)