sheet

Displays a stack as a sheet.

# Metadata

Platforms: desktop, server OS: mac, windows, linux Introduced: 2.0 Security:

# Syntax

sheet stack [in parentStack]

# Params

- stack : Any stack reference. - parentStack : Any open stack that is not being displayed as a sheet.

# Examples

sheet stack "myFilePickerStack"

sheet me in stack "project1"

# Description

Use the sheet command to display a stack as a custom sheet.

The sheet command opens the stack as a sheet in the window of the specified parentStack. If you don't specify a parentStack, the sheet is displayed in the window of the defaultStack.

The stack's rectangle and location properties are ignored.

While a sheet dialog box is open, nothing else can be done in the stack the sheet is displayed in. Because of this, you should use sheets only when a stack must obtain feedback from the user before it can continue.

If the stack is already open, the sheet command closes the stack and reopens it as a sheet, so closeStack and openStack, closeCard and openCard, and (if applicable) closeBackground and openBackground messages are sent to the parentStack's current card as a result of execute this command. Use the lock messages command before execute modal if you want to prevent the close messages from being sent; the open messages are sent regardless of the setting of the lockMessages property.

The sheet command pauses the running handler until the sheet is dismissed (usually by clicking a button in the sheet). To return information to the handler about which button was clicked, in the button script, set a global or custom property. After the dialog box is dismissed, the handler can query this variable or property and act accordingly.

Attempting to open a sheet from within another sheet displays the second stack as a modal dialog box instead.

>*Cross-platform note:* The appearance of sheets on OS X, in which > they slide into view from the title bar, is unique to that OS and > does not happen on Windows or Unix. However, on all three > OSes, dialogs opened with the sheet command will be window-modal, > rather than application-modal. A window-modal dialog will > block further interaction in the window being covered by the dialog, > while allowing interaction in all others. In an application-modal > window, interactions with all other windows are prevented until the > dialog is dismissed.

# Tags

# See