On 8/27/2014, 1:24 PM, Terence Heaford wrote:
The stack size was 1660 x 1002 as expected but the top of the window
is now underneath the menubar.

Yes, it will be if the stack is taller than the available screen space, or the top is above the menu bar when its centered on screen. You can push it down using the message box or a script: set the top of this stack to 45.

I read the dictionary entry for windowboundingrect and it says:

"The windowBoundingRect value is checked against the window's
position before the preOpenStack message is sent. This means that if
you want a stack to extend outside the windowBoundingRect, you should
set its rectangle  property to the desired value in a preOpenStack
handler. This ensures that the window is enlarged to the size you
specify before it appears, instead of being resized when the
windowBoundingRect is checked."

So, unless I am misunderstanding (probably) this suggests that I have
to save the rect of the window somewhere and resize the window on
opening in the preOpenStack handler?

Yes, or reference something in the stack that's the right dimensions. I'm working on a stack where a background image is the same size as the stack, so I just set the width and height of the stack to the width and height of that image. If you know you'll never change the dimensions, you can just hard-code a width and height into the preOpenStack handler. You probably shouldn't hard-code an exact rectangle because that rectangle may not be accurate on a monitor of a different size.

Does this also apply to standalone apps?

In standalones, I believe the windowboundingrect is restricted only by the OS "furniture" -- menubar, dock, task bar, etc. and is basically the "working screenrect". If your stack fits inside that area you won't have to worry about it. The IDE sets the bounding rectangle much smaller to accomdate its own palettes, but that's not the default.

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to