Skip to main content

card

Type

object

Summary

An object type that is a single page of a stack.

Syntax

card

Description

Use the card object type to display different sets of controls in the same stack window.

A card corresponds to a single page of a stack: one card of each stack can be seen at a time. Each stack contains one or more cards.

Cards are contained in stacks, and may contain any kind of control.

Examples

go to first card
set the marked of this card to true

glossary: stack window, object type

keyword: templateCard

object: stack, control

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Associated Syntax

Message

NameSummarySyntax
resumeSent to the current card when the application is brought to the foreground. resume
closeBackgroundSent to the current card when the user is leaving a card that has a group to go to one that doesn't have the group.closeBackground <pBackgroundID>
revEndXMLNodeSent to the current card when the revXMLCreateTreeFromFile function encounters a closing tag while parsing an XML file.revEndXMLNode <pNodeName>
objectSelectionEndedSent when, in edit mode, the user completes a drag action used to select controls. objectSelectionEnded
editScriptSent to the current card when the object's script is opened with the edit command.editScript <pObjectID>, <pAtItems>
socketErrorSent when an error occurs on a socket that causes the socket to close or to fail to open.socketError <pSocketID>, <pErrorString>
tabKeySent when the user presses the Tab key.tabKey
revXMLEndTreeSent to the current card when the revXMLCreateTreeFromFile function finishes parsing an XML document.revXMLEndTree
newToolSent to the caller of choose when a different tool is chosen.newTool <pToolName>
closeStackRequestSent to the current card when the user tries to close a stack.closeStackRequest
mouseWithinSent periodically to an object while the mouse pointer is within its borders.mouseWithin
shutdownRequestSent to the current card of the defaultStack when the user tries to quit the application.shutdownRequest
saveStackRequestSent to the current card when the stack is about to be saved.saveStackRequest
mouseUpInBackdropSent when the user releases the mouse button, while the mouse pointer is in the backdrop.mouseUpInBackdrop <pButtonNumber>
iconifyStackSent to the current card when a stack is minimized.iconifyStack
commandKeyDownSent when a Command key combination (Control-key on Unix or Windows) is pressed.commandKeyDown <pKeyName>
openStackSent to the destination card right after you open a stack.openStack
signalSent to the current card when another process sends a kill signal to the application.signal <pSigNumber>
controlKeyDownSent when a Control key combination is pressed.controlKeyDown <pKeyName>
revStartXMLDataSent to the current card when the revXMLCreateTree or revXMLCreateTreeFromFile function encounters data between tags while parsing an XML document.revStartXMLData <pElementData>
undoChangedSent to the current card when the Undo action changes.undoChanged
functionKeySent when the user presses a function key.functionKey <pKeyNumber>
optionKeyDownSent when the user presses an Option key, Meta key, or Alt key combination.optionKeyDown <pKeyName>
nameChangedSent to an object when its name is changed.nameChanged <pOldName>, <pNewName>
idleSent periodically to the current card if no other message is being sent. idle
dragDropSent to the object where data was dropped when a drag and drop finishes.dragDrop
revStartXMLNodeSent to the current card when the revXMLCreateTreeFromFile function encounters an opening tag while parsing an XML file.revStartXMLNode <pNodeName>, <pNodeAttributes>
preOpenStackSent to the destination card when you open a stack.preOpenStack
suspendStackSent to the current card when something makes its stack no longer the active window.suspendStack
queryRecordChangedSent to the current card of a stack containing a query object when that query object has been updated.queryRecordChanged <pObjectName>
dragLeaveSent when the mouse pointer moves out of an object during a drag and drop.dragLeave
socketTimeoutSent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property. socketTimeout <pSocketID>
selectedObjectChangedSent to an object when it is selected.selectedObjectChanged
dragEnterSent when the mouse pointer moves into an object during a drag and drop.dragEnter
enterKeySent when the user presses the Enter key, if there is no text selection. enterKey
systemAppearanceChangedSent to the current card of the defaultStack when the systemAppearance changes.systemAppearanceChanged
backspaceKeySent to the active control, or to the current card if no control is focused.backspaceKey
escapeKeySent when the user presses the Escape key.escapeKey
newCardSent to a new card right after it's created.newCard
moveStackSent to the current card when the user moves the stack window.moveStack <pNewStackH>, <pNewStackV>
preOpenCardSent to a card when you go to the card.preOpenCard
copyKeySent when the user presses the key combination equivalent to the Copy menu item.copyKey
mouseReleaseSent when the user releases the mouse outside the control that was clicked. mouseRelease <pButtonNumber>
arrowKeySent to the active control, or to the current card if no control is focused, when the user presses an arrow key.arrowKey <pKey>
pasteKeySent when the user presses the key combination equivalent to the "Paste" menu item.pasteKey
unIconifyStackSent when a stack is un-minimized.unIconifyStack
mouseDownSent when the user presses the mouse button.mouseDown <pButtonNumber>
mouseEnterSent when the mouse pointer moves into an object.mouseEnter
openCardSent to a card right after you go to the card.openCard
deleteKeySent to the active (focused) control(glossary), or to the current card if there is no active control.deleteKey
shutdownSent to the current card of the defaultStack when the application is quitting.shutdown
suspendSent to the current card when the application moves to the background. suspend
mouseUpSent when the user releases the mouse button.mouseUp <pButtonNumber>
closeStackSent to the current card when the stack closes.closeStack
dragMoveSent when the user moves the mouse during a drag and drop.dragMove
cutKeySent when the user presses the key combination equivalent to the Cut menu item.cutKey
mouseStillDownSent periodically while the mouse button is being held down.mouseStillDown <pButtonNumber>
newStackSent to the current card of a new stack right after the stack is created. newStack
resumeStackSent to the current card when a stack window is brought to the front. resumeStack
resizeStackSent to the current card when the stack window is resized.resizeStack <pNewWidth>, <pNewHeight>, <pOldWidth>, <pOldHeight>
deleteStackSent to the current card of a stack that's about to be deleted.deleteStack
closeCardSent to the current card when the user goes to another card.closeCard
mouseMoveSent when the user moves the mouse.mouseMove <pNewMouseH>, <pNewMouseV>
revXMLStartTreeSent to the current card when the revXMLCreateTreeFromFile function starts parsing an XML document.revXMLStartTree
appleEventthe current card whenever the application receives an Apple event.appleEvent <pClass>, <pID>, <pSender>
keyDownSent when the user presses a key.keyDown <pKeyName>
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>
keyUpSent when the user releases a pressed key.keyUp <pKeyName>
mouseDownInBackdropSent when the user presses the mouse button while the mouse pointer is in the backdrop.mouseDownInBackdrop <pButtonNumber>
mouseDoubleDownSent when the user double-clicks.mouseDoubleDown <pButtonNumber>
preOpenBackgroundSent to the current card when you go from a card that does not have a group to a card that does.preOpenBackground <pBackgroundID>
deleteCardSent to a card just before it is removed from the stack.deleteCard
desktopChangedSent to the current card of the defaultStack whenever the screenRect function changes.desktopChanged
objectSelectionStartedSent when, in edit mode, the user drags over a controlobjectSelectionStarted

Property

NameSummarySyntax
markSpecifies whether a card has been marked for later access by the sort, go, or print commands.set the mark of <card> to {true | false}
topRightSpecifies the location of the specified object's upper right corner. set the topRight of <object> to <right>, <top>
formattedWidthReports the width needed by an object to display its full contents without scrolling.get the formattedWidth of <object> get the formattedWidth of [<chunk> of] <field>
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>}
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>
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>}
borderPixelSpecifies which entry in the color table is used for the color of an object's border.set the borderPixel of <object> to <colorNumber>
showPictThis property is included in LiveCode for compatibility with imported HyperCard stacks.set the showPict of <card> to {true | false}
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>
behaviorAllows an object to inherit its script handlers from another object.set the behavior of <object> to {<button> | <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>}
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>
formattedRectReports the rectangle that surrounds all the objects in a card or group.get the formattedRect of {<card> | <group>} get the formattedRect of <chunk> of <field>
shadowOffsetSpecifies the size and direction of an object's drop shadow.set the shadowOffset of <object> to <pixels>
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>]
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>}
dontSearchSpecifies whether the find command skips a field, group, or card. set the dontSearch of <field> to {true | false}
defaultButtonReports the long ID of the current card's default button. get the defaultButton of <card>
sharedGroupIdsReports the ids of all the shared groups of the card or stackget the sharedGroupIds of {<card> | <stack>}
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}
topColorSpecifies the color of a three-D object's raised edge.set the topColor of <object> to {empty | <colorName> | <RGBColor>}
groupNamesReports the groups on a card.get the groupNames of <card>
bottomSpecifies how far an object's bottom edge is from the top of the window or screen.set the bottom of <object> to <number>
borderPatternSpecifies the pattern of an object's border.set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}
heightSpecifies the distance from an object's top edge to its bottom edge. set the height of <object> to <numberOfPixels>
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>
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>
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>
bottomRightSpecifies the location of the specified object's lower right corner. set the bottomRight of <object> to right,bottom
formattedLeftReports the distance between the left edge of the stack window and the leftmost object in a card or group.get the formattedLeft of {<group> | <card>} get the formattedLeft of <chunk> of <field>
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>
locationSpecifies where an object is.set the location of <object> to <point>
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}
groupIDsReports the groups on a card.get the groupIDs of <card>
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>
backgroundPixelSpecifies which entry in the color table is used for an object's background color.set the backgroundPixel of <object> to <colorNumber>
formattedTopReports the distance between the top edge of the stack window and the topmost object in a card or group.get the formattedTop of {<card> | <group>} get the formattedTop of <chunk> of <field>
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}
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
ownerReports which object is next in the object hierarchy.get the [{ long | abbreviated | short }] owner of <object>
formattedHeightReports the height needed by an object to display its full contents without scrolling.get the formattedHeight of <object> get the formattedHeight of [<chunk> of] <field>
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}
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}
Thank you for your feedback!

Was this page helpful?