Skip to main content

stack

Type​

object

Summary​

The basic LiveCode object: a window.

Syntax​

stack

Description​

Use the stack object type to display a window, palette, or dialog box.

A stack corresponds to a single window. Each LiveCode file contains one or more stacks. The first stack in a stack file is called the main stack; any other stacks in the stack file are called substacks of the main stack.

Stacks contain one or more cards, and may optionally contain backgrounds.

note

The type of window a stack is displayed in depends on the stack's style property and whether the stack was opened with the go, topLevel, palette, modal, or modeless command.

Examples​

go to stack "Help"
put the short name of stack 3 after field "Stacks List"

glossary: stack version, object, property, dialog box, command, object type

keyword: templateStack

object: stack

property: mode, defaultStack, style

command: topLevel, go, modal, palette, modeless

function: revLoadedStacks, mouseStack

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Associated Syntax​

Function

NameSummarySyntax
mobileAdGetTopLeftReturns the topLeft position of an ad.mobileAdGetTopLeft (<adName>)
mobileAdGetVisibleReturn true if an ad is visible.mobileAdGetVisible(<ad>)
iphoneReachabilityTargetReturns the server currently being monitorediphoneReachabilityTarget
mobileAdsReturn a list of all mobile ads that have been created.mobileAds()

Message

NameSummarySyntax
mobileStandaloneSavedSent to the mainstack after it has been saved as a mobile standalone application or the simulation was started.mobileStandaloneSaved <pTargetType>, <pAppBundle>
socketErrorSent when an error occurs on a socket that causes the socket to close or to fail to open.socketError <pSocketID>, <pErrorString>
mouseWithinSent periodically to an object while the mouse pointer is within its borders.mouseWithin
reloadStackSent to a main stack when the user tries to open a main stack with the same name as a previously-opened stack.reloadStack <pStackName>, <pFileName>
startupSent to the first card opened when the application starts up.startup <pMode>
errorDialogSent to an object when one of its handlers cannot be run due to an execution error.errorDialog <pExecutionError>, <pParseError>
savingMobileStandaloneSent to the mainstack when a mobile standalone application is being saved or the simulation is started.savingMobileStandalone <pTargetType>, <pAppBundle>
pushNotificationRegistrationErrorSent when the application fails to register to receive Push Notifications form a Push Notification Server.pushNotificationRegistrationError <pErrorMessage>
nameChangedSent to an object when its name is changed.nameChanged <pOldName>, <pNewName>
releaseStackSent to a stack when the stack is removed from the message path with the stop using command.releaseStack
mainStackChangedSent to a stack when its mainStack is changed.mainStackChanged
socketTimeoutSent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property. socketTimeout <pSocketID>
savingStandaloneSent to the mainstack when a standalone application is being saved.savingStandalone
relaunchAfter having launched an application, upon launching a successive instance the LiveCode engine will send a relaunch message to the first stack of the application.relaunch <pCommandLineArguments>
selectedObjectChangedSent to an object when it is selected.selectedObjectChanged
standaloneSavedSent to the mainstack after it has been saved as a standalone application. standaloneSaved <pFolderSavedIn>
mouseReleaseSent when the user releases the mouse outside the control that was clicked. mouseRelease <pButtonNumber>
mouseDownSent when the user presses the mouse button.mouseDown <pButtonNumber>
pushNotificationReceivedSent when the application receives a push notification from a Push Notification Server.pushNotificationReceived <pMessage>
pushNotificationRegisteredSent when the application registers to receive Push Notifications form a Push Notification Server.pushNotificationRegistered <pSignature>
reachabilityChangedSent when the network connectivity to a monitored server changes.reachabilityChanged <pHostNameOrAddress>, <pReachabilityInfo>
mouseEnterSent when the mouse pointer moves into an object.mouseEnter
mouseUpSent when the user releases the mouse button.mouseUp <pButtonNumber>
mouseStillDownSent periodically while the mouse button is being held down.mouseStillDown <pButtonNumber>
libraryStackSent to a stack when it is placed in the message path by the start using command.libraryStack
mouseMoveSent when the user moves the mouse.mouseMove <pNewMouseH>, <pNewMouseV>
localNotificationReceivedSent when the application receives a local notification from the operating system.localNotificationReceived <pMessage>
mouseLeaveSent when the mouse pointer moves out of an object.mouseLeave
socketClosedSent when the remote system closes a socket.socketClosed <pSocketID>
mouseDoubleUpSent when the mouse button is released at the end of a double-click.mouseDoubleUp <pButtonNumber>
mouseDoubleDownSent when the user double-clicks.mouseDoubleDown <pButtonNumber>

Command

NameSummarySyntax
iphoneSetReachabilityTargetStarts monitoring a server of reachability via the network.iphoneSetReachabilityTarget <hostNameOrAddress>
iphoneSetRedrawIntervalSynchronizes LiveCode redraws with the device's refresh rate.iphoneSetRedrawInterval <frameInterval>
mobileAdSetVisibleSpecifies whether an ad can be seen or is hidden.mobileAdSetVisible <ad>, <visible>
mobileAdSetTopLeftSets the topLeft position of an ad.mobileAdSetTopLeft <adName>, <topLeft>

Property

NameSummarySyntax
decorationsSpecifies the window controls and appearance of a stack window.set the decorations of <stack> to {<controlList> | <WDEF> | default | empty}
zoomBoxShows a window's zoom box.set the zoomBox of <stack> to {true | false}
topRightSpecifies the location of the specified object's upper right corner. set the topRight of <object> to <right>, <top>
maxWidthSpecifies how wide a stack window can be made when it's resized.set the maxWidth of <stack> to <pixels>
cantDeleteSpecifies whether an object can be deleted.set the cantDelete of {<card> | <group> | <stack>} to {true | false}
scriptSpecifies the contents of an object's **script**.set the script of <object> to <string>
borderColorSpecifies the color of an object's border.set the borderColor of <object> to {empty | <colorName> | <RGBColor>} set the borderColor of <line> of <field> to {empty | <colorName> | <RGBColor>}
minWidthSpecifies how narrow a stack window can be made when it's resized.set the minWidth of <stack> to <pixels>
hilitePixelSpecifies which entry in the color table is used for the background color when an object, or text in an object, is highlighted. set the hilitePixel of <object> to <colorNumber>
patternsSpecifies all the patterns of an object, in shorthand form.set the patterns of <object> to <patternsList>
screenReturns the screen number that the stack is on. The number corresponds to the line of the rect of the screen returned by the screenrects.put the screen of <stack>
compositorCacheLimitSpecifies the maximum number of bytes the engine should use to cache content for the stack.set the compositorCacheLimit of <stack> to <cacheLimit>
numberSpecifies an object's position within a file, a card's position within a stack, or a control's layer on a card.set the number of <card> to <number> get the number of <object>
topLeftSpecifies the location of the specified object's upper left corner. set the topLeft of <object> to left,top
altIDSpecifies an alternate ID for objects.set the altID of <object> to <IDNumber>
rightSpecifies how far an object's right edge is from the left edge of the window or screen.set the right of <object> to <pixels>
focusPatternSpecifies the pattern used for an object's outline when it has the insertion point or is active focused.set the focusPattern of <object> to {<patternNumber> | <imageID> | empty}
topPatternSpecifies the pattern used to draw a three-D object's raised edge. set the topPattern of <object> to {<patternNumber> | <imageID> | empty}
foregroundColorSpecifies the color of object text and borders.set the foregroundColor of <object> to {empty | <colorName> | <RGBColor>} set the foregroundColor of [<chunk> of] <field> to {empty| <colorName> | <RGBColor>}
passwordSpecifies a **password** that the user must enter before making changes to the stack.set the password of <stack> to {<passwordString> | empty}
startUpIconicSpecifies whether, when a stack opens, it should be iconified or displayed as a window.set the startupIconic of <stack> to {true | false}
acceleratedRenderingSpecifies whether to use accelerated rendering for this stackset the acceleratedRendering of <stack> to { true | false }
documentFilenameSpecifies the file path to the file that the stack represents.set the documentFilename of <stack> to <filename>
borderPixelSpecifies which entry in the color table is used for the color of an object's border.set the borderPixel of <object> to <colorNumber>
shadowPixelSpecifies which entry in the color table is used for the color of an object's drop shadow or the background of a scrollbar.set the shadowPixel of <object> to <colorNumber>
recentNamesReports a list of the most recently visited cards, in reverse order.get the recentNames [of <stack>]
behaviorAllows an object to inherit its script handlers from another object.set the behavior of <object> to {<button> | <stack>}
passKeyEnters a password for a locked stack, letting the user modify the stack. set the passKey of <stack> to <passwordString>
recentCardsReports the long ID properties of recent cards|recently visited cards. get the recentCards [of <stack>]
customPropertiesSpecifies all the custom properties of an object that are in the current customPropertySet, along with their settings.set the customProperties of <object> to <propertiesArray> set the customProperties[<propertySet>] of <object> to <propertiesArray>
shadowColorSpecifies the color of an object's drop shadow or the background of a scrollbar.set the shadowColor of <object> to {empty | <colorName> | <RGBColor>}
borderWidthSpecifies the width of an object's border.set the borderWidth of <object> to <pixelWidth> set the borderWidth of <line> of <field> to <pixelWidth>
iconicSpecifies whether a stack window is minimized.set the iconic of <stack> to {true | false}
formatForPrintingSpecifies whether font layout is done using printer fonts or screen fonts.set the formatForPrinting of <stack> to {true | false}
textSizeSpecifies the point size of text displayed by an object.set the textSize of <object> to <pointSize> set the textSize of [<chunk> of] <field> to <pointSize>
windowManagerPlaceSpecifies whether a Unix window manager can automatically place a stack's window when the stack is opened.set the windowManagerPlace to {true | false}
shadowOffsetSpecifies the size and direction of an object's drop shadow.set the shadowOffset of <object> to <pixels>
editMenusSpecifies that the menu bar appears at the top of the stack window.set the editMenus of <stack> to {true | false}
textFontSpecifies the font face of text in an object.set the textFont of <object> to <fontName> [, <language>] set the textFont of [<chunk> of] <field> to <fontName> [, <language>]
menubarSpecifies the name of a menu bar to use when a stack is frontmost.set the menubar of <stack> to {<groupname> | empty}
backgroundColorSpecifies an object's background color.set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>} set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>}
hiliteColorSpecifies the color of the background when an object, or text in an object, is highlighted.set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>}
sharedGroupNamesReports the names of all the shared groups of the card or stackget the sharedGroupNames of {<card> | <stack>}
externalCommandsLists the available external commands for a stack.get the externalCommands of <stack>
externalFunctionsLists the available external functions for a stack.get the externalFunctions of <stack>
HCAddressingDetermines whether grouped fields and card buttons are assumed if the field or button's domain is not specified.set the HCAddressing of <stack> to {true | false}
windowIDReports the operating system's ID for a stack window.get the windowID of <stack>
cardNamesLists the short name property of all the cards in a stack, or all the cards that contain a specified group.get the cardNames of {group | stack}
compositorTileSizeSpecifies the size the fragments of object images it caches should be.set the compositorTileSize of <stack> to <tileSize>
compositorTypeSpecifies which compositor is used when rendering a stack.set the compositorType of <stack> to <compositorType>
sharedGroupIdsReports the ids of all the shared groups of the card or stackget the sharedGroupIds of {<card> | <stack>}
windowShapeSpecifies an image whose mask is used as the shape of the window.set the windowShape of stack to {imageID | 0}
bottomPatternSpecifies the pattern of a three-D object's lowered edge.set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>}
customPropertySetsLists all the custom property sets that can apply to an object. get the customPropertySets of <object>
hilitePatternSpecifies the fill pattern used for the background when an object, or text in an object, is highlighted. set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty}
visibleSpecifies whether an object can be seen or is hidden.set the [effective] visible of <object> to {true | false}
shadowPatternSpecifies the pattern of an object's drop shadow.set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty}
layerSpecifies the back-to-front order of objects on a card or the order of cards in a stack.set the layer of <object> to {<layerNumber> | top | bottom}
backgroundPatternThe **backgroundPattern** specifies the pattern used to draw an object's background.set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty}
backgroundNamesReports the backgrounds in a stack.get the backgroundNames of <stack>
topColorSpecifies the color of a three-D object's raised edge.set the topColor of <object> to {empty | <colorName> | <RGBColor>}
maxHeightSpecifies how tall a stack window can be made when it's being resized.set the maxHeight of <stack> to <pixels>
HCStackReports whether a stack was originally imported from HyperCard. get the HCStack of <stack>
bottomSpecifies how far an object's bottom edge is from the top of the window or screen.set the bottom of <object> to <number>
scriptOnlySpecifies whether the stack should be saved as script only which does not retain any objects or custom propertiesset the scriptOnly of <stack> to { true | false }
substacksSpecifies which stacks are associated with a main stack, and saved in the same file.set the substacks of <stack> to <substacksList>
mainStackSpecifies which main stack a substack belongs to.set the mainStack of <stack> to <mainStack>
borderPatternSpecifies the pattern of an object's border.set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}
externalPackagesLists the available external packages for a stack.get the externalPackages of <stack>
heightSpecifies the distance from an object's top edge to its bottom edge. set the height of <object> to <numberOfPixels>
metalDisplays a window with a textured-metal appearance.set the metal of <stack> to {true | false}
draggableShows a stack's title bar.set the draggable of <stack> to {true | false}
minStackFileVersionGet the minimum stack file version for a stack that will allow it to be safely saved without data loss.get the minStackFileVersion of <stack>
freeSizeAlways reports zero and is included in LiveCode for compatibility with imported HyperCard stacks.get the freeSize of <stack>
bottomPixelSpecifies which entry in the color table is used for the color of a three-D object's lowered edge.set the bottomPixel of <object> to <colorNumber>
minimizeBoxShows a window's minimize box or collapse box.set the minimizeBox of <stack> to {true | false}
modifiedMarkSpecifies whether the modified indicator dot should be displayed on the close-box of a stack.set the modifiedMark of <stack> to {true | false}
pixmapIDSpecifies the ID of the data structure the operating system uses to hold the screen image of the current card.get the pixmapID of <stack>
resizableSpecifies whether the user can resize a stack window.set the resizable of <stack> to {true | false}
dynamicPathsSpecifies whether the message path includes the current card and its owners. set the dynamicPaths of <stack> to {true | false}
topSpecifies how far an object's top edge is from the top of the window or screen.set the top of <object> to <numberOfPixels>
rectangleSpecifies the area within which an object is drawn.set the rectangle of <object> to <left>, <top>, <right>, <bottom> get the [effective] rectangle of <object>
unicodeTitleSpecifies the string shown in a stack window's title bar as a unicode string. set the unicodeTitle of stack to titleString
invisibleSpecifies whether an object is hidden.set the invisible of <object> to {true | false} get the [effective] invisible of <object>
topPixelSpecifies which entry in the color table is used for the color of a three-D object's raised edge.set the topPixel of <object> to <colorNumber>
cantAbortSpecifies whether the user can halt a handler with a key combination. set the cantAbort of <stack> to {true | false}
bottomRightSpecifies the location of the specified object's lower right corner. set the bottomRight of <object> to right,bottom
foregroundPixelSpecifies which entry in the color table is used for an object's text and borders.set the foregroundPixel of <object> to <colorNumber>
bottomLeftSpecifies the location of the specified object's lower left corner. set the bottomLeft of <object> to <left>, <bottom>
charSetIndicates whether the Macintosh or ISO 8859 character set was used to enter a stack's text.get the charSet of <stack>
cardIDsReports the cards in a stack or the cards that a specified group appears on. get the cardIDs of {group | stack}
labelSpecifies the string shown in a stack window's title bar, or a text label to be displayed on the specified object if its showName property is true.set the label of <object> to <labelString>
locationSpecifies where an object is.set the location of <object> to <point>
externalsSpecifies a list of files containing external code that are to be loaded into memory when the stack opens.set the externals of <stack> to <filePathsList>
stackFilesSpecifies a list of stacks and their file names, to be used when a stack that's not open is referenced in a handler.set the stackFiles of <stack> to <stackFileList>
leftSpecifies how far an object's left edge is from the left edge of the window or screen.set the left of <object> to <numberOfPixels>
showFocusBorderDisplays a border around the active control.set the showFocusBorder of <control> to {true | false}
liveResizingCauses a stack window to display its contents changing during resizing, instead of redrawing the contents after the window is resized.set the liveResizing of <stack> to {true | false}
filename of stackReports the file path of the file a stack is stored in.set the filename of <stack> to <filePath>
cantModifySpecifies whether the user can make changes to a stack.set the cantModify of <stack> to { true | false }
destroyWindowSpecifies whether the memory used by a stack window is purged when the stack is closed.set the destroyWindow of <stack> to {true | false}
systemWindowMakes a window float above all running applications.set the systemWindow of <stack> to {true | false}
selectedSpecifies whether an object is **selected**.set the selected of <object> to {true | false}
propertiesSpecifies some of an object's **properties** and their current values. set the properties of <object> to <propertiesArray>
colorsSpecifies all the colors of an object, in shorthand form.set the colors of <object> to <colorsList>
IDReports the unique ID number assigned to an object.set the ID of {image | stack} to <number> get the [{ long | abbreviated | short }] ID of <object>
modeReports the type of window a stack is displayed in.get the mode of <stack>
customPropertySetSpecifies a set of custom properties applied to an object.set the customPropertySet of object to {setName | empty}
backgroundPixelSpecifies which entry in the color table is used for an object's background color.set the backgroundPixel of <object> to <colorNumber>
currentCardThe short name of the current card of a stackget the currentCard of <stack> set the currentCard of <stack> to <cardName>
destroyStackSpecifies whether a stack is purged from memory when it's closed, or whether it remains in memory.set the destroyStack of <stack> to {true | false}
fullscreenSpecifies whether a stack window takes up the entire screen.set the fullscreen of <stack> to { true | false }
focusPixelSpecifies which entry in the color table is used for the color of an object's outline when it has the insertion point or is active focused.set the focusPixel of <object> to <colorNumber>
bottomColorSpecifies the color of a three-D object's lowered edge.set the bottomColor of <object> to {empty | <colorName> | <RGBColor>}
textStyleSpecifies the style or styles applied to text in an object.set the textStyle of <object> to {empty | plain | <stylesList>} set the textStyle of [<chunk> of] <field> to {empty | plain | <stylesList>} set the textStyle[<style>] of object to {true | false}
minHeightSpecifies how short a stack window can be made when it's resized.set the minHeight of <stack> to <pixels>
threeDSpecifies whether an object appears to stick out of or recede into the screen.set the threeD of <object> to {true | false}
widthThe **width** of an object is the distance from its left edge to its right edge.set the width of <object> to <numberOfPixels>
showBorderSpecifies whether an outline is drawn around an object.set the showBorder of <object> to {true | false}
nameSpecifies the name of an object.set the [{ long | abbreviated | short }] name of <object> to <string> get the name
closeBoxShows a window's close box.set the closeBox of <stack> to {true | false}
ownerReports which object is next in the object hierarchy.get the [{ long | abbreviated | short }] owner of <object>
focusColorSpecifies the color of the outline around the active control or the field with the insertion point.set the focusColor of <object> to {empty | <colorName> | <RGBColor>}
customKeysLists the names of all the custom properties of an object. set the customKeys of <object> to {<propertiesList> | empty}
editBackgroundSpecifies that any objects created should be added to the background. set the editBackground of <stack> to {true | false}
foregroundPatternSpecifies the pattern used for object text and borders.set the foregroundPattern of <object> to {<patternNumber> | <imageID> | empty} set the foregroundPattern of [<chunk> of] <field> to {<patternNumber> | <imageID> | empty}
backgroundIDsReports the backgrounds in a stack.get the backgroundIDs of <stack>
Thank you for your feedback!

Was this page helpful?