Stack Height & Menu Buttons

Martin Baxter martin at harbourtown.co.uk
Mon Jun 23 12:35:01 EDT 2003


Rob,

As it happens I've been trying to get to the bottom of this issue myself,
since it goes wrong frequently and results in windows lacking 21 pixels off
the bottom.
I made a similar test to yours and ran it in a standalone so I could see
the measurements during startup.

Here's the report:
MacOS
6/23/03 4:06 PM
standalone application

STARTUP
scroll of stack = 0
height of stack = 421
height of card = 421

PREOPENSTACK
scroll of stack = 21
height of stack = 421
height of card = 442

OPENSTACK
scroll of stack = 21
height of stack = 400
height of card = 421

As you can see, between startup and preopenstack, 21 pixels have been added
to both the card and the stack height, and the stack's scroll set to 21.
Then, between preopenstack and openstack, 21 pixels have been taken off the
height of the stack.

The end result is to subtract 21 pixels from the stack height and set the
stack scroll to 21. The final measurements are correct for the stack in
question. Why the extra operations are carried out is unclear.

I'm trying to determine why stacks containing MacOS menus frequently (but
not consistently) get truncated by 21 pixels, especially when built into
standalones (in my experience). It's rather a nuisance, as we might say;)

martin baxter

>Rob Cozens wrote:
>Last week Richard asked if anyone cared to speculate how or why a
>stack's revStack property could affect stack window size.  Based on
>my experience this morning, my speculation is they do not...rather
>the problem he & I saw appears to be due to the fact that Rev or the
>MC engine adjusts the window size on Mac OS systems between the
>stack's preOpenStack & openStack handlers.
>
>	1 Create a simple stack with a menu group.
>
>	2 Note the stack height and place a statement in preOpenStack logic
>	  setting the stack height.
>
>	3 Quit Rev, restart, & open the stack...the stack window will be
>	  correct if the menubar's "Use as menu on Mac OS" property is NOT
>	  checked, but incorrect if the property is set.
>
>	4 With the "use as menu..." on, move the height adjustment from
>	  preOpenStack to openStack.
>
>	5 Repeat Step 3...height is correct.
>
>Note: The was a recent post that suggested setting stack height was
>not necessary because the window is only truncated in the Development
>UI.
>--
>







More information about the use-livecode mailing list