Error getting tags :
error 404Error getting tags :
error 404 resizeStack | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
resizeStack
Basics
Expander triangle
Type
Message
Syntax

resizeStack newWidth,newHeight,oldWidth,oldHeight

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Sent to the current card when the stack window is resized.
Examples

on resizeStack newWidth,newHeight -- put an object in the middle
set the location of graphic "Middle" \
to newWidth div 2,newHeight div 2
pass resizeStack
end resizeStack

Additional Comments
Expander triangle

Handle the resizeStack message if you want to update the position of objects or do other tasks when the stack window changes size.

Parameters:

The newWidth is the stack's new width in pixels.

The newHeight is the stack's new height in pixels.

The oldWidth is the stack's original width in pixels.

The oldHeight is the stack's original height in pixels.

Comments:

The resizeStack message is sent when the user resizes the stack by dragging its size box. It is also sent if a handler changes the size of the stack by changing its properties (width, height, and so on).

The resizeStack message is sent after the resizing is finished. This means that you cannot prevent a stack's size from being changed by trapping this message. If the stack's liveResizing property is true, resizeStack messages are sent continuously during resizing, but you still cannot prevent resizing by trapping the message.

On Mac OS X systems when the liveResizing property is true and on all other systems, the oldWidth and oldHeight for each resizeStack message is the same as the newWidth and newHeight for the previous resizeStack. The stack's original width and height are passed only with the first resizeStack message sent during a resize operation.

The screen is locked while a resizeStack handler is running, so it is not necessary to use the lock screen command to prevent changes from being seen. (However, the lockScreen property is not set to true.)

Note: If the stack's vScroll property is nonzero, the amount of scroll is not included in the newHeight and oldHeight. This means that the parameters of the resizeStack message are always equal to the stack's height before and after resizing, regardless of the vScroll setting.

User Comments
Expander triangle