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
Related
glossary: stack window, object type
keyword: templateCard
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile
Associated Syntax
Message
Name | Summary | Syntax |
---|---|---|
resume | Sent to the current card when the application is brought to the foreground. | resume |
closeBackground | Sent 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> |
revEndXMLNode | Sent to the current card when the revXMLCreateTreeFromFile function encounters a closing tag while parsing an XML file. | revEndXMLNode <pNodeName> |
objectSelectionEnded | Sent when, in edit mode, the user completes a drag action used to select controls. | objectSelectionEnded |
editScript | Sent to the current card when the object's script is opened with the edit command. | editScript <pObjectID>, <pAtItems> |
socketError | Sent when an error occurs on a socket that causes the socket to close or to fail to open. | socketError <pSocketID>, <pErrorString> |
tabKey | Sent when the user presses the Tab key. | tabKey |
revXMLEndTree | Sent to the current card when the revXMLCreateTreeFromFile function finishes parsing an XML document. | revXMLEndTree |
newTool | Sent to the caller of choose when a different tool is chosen. | newTool <pToolName> |
closeStackRequest | Sent to the current card when the user tries to close a stack. | closeStackRequest |
mouseWithin | Sent periodically to an object while the mouse pointer is within its borders. | mouseWithin |
shutdownRequest | Sent to the current card of the defaultStack when the user tries to quit the application. | shutdownRequest |
saveStackRequest | Sent to the current card when the stack is about to be saved. | saveStackRequest |
mouseUpInBackdrop | Sent when the user releases the mouse button, while the mouse pointer is in the backdrop. | mouseUpInBackdrop <pButtonNumber> |
iconifyStack | Sent to the current card when a stack is minimized. | iconifyStack |
commandKeyDown | Sent when a Command key combination (Control-key on Unix or Windows) is pressed. | commandKeyDown <pKeyName> |
openStack | Sent to the destination card right after you open a stack. | openStack |
signal | Sent to the current card when another process sends a kill signal to the application. | signal <pSigNumber> |
controlKeyDown | Sent when a Control key combination is pressed. | controlKeyDown <pKeyName> |
revStartXMLData | Sent to the current card when the revXMLCreateTree or revXMLCreateTreeFromFile function encounters data between tags while parsing an XML document. | revStartXMLData <pElementData> |
undoChanged | Sent to the current card when the Undo action changes. | undoChanged |
functionKey | Sent when the user presses a function key. | functionKey <pKeyNumber> |
optionKeyDown | Sent when the user presses an Option key, Meta key, or Alt key combination. | optionKeyDown <pKeyName> |
nameChanged | Sent to an object when its name is changed. | nameChanged <pOldName>, <pNewName> |
idle | Sent periodically to the current card if no other message is being sent. | idle |
dragDrop | Sent to the object where data was dropped when a drag and drop finishes. | dragDrop |
revStartXMLNode | Sent to the current card when the revXMLCreateTreeFromFile function encounters an opening tag while parsing an XML file. | revStartXMLNode <pNodeName>, <pNodeAttributes> |
preOpenStack | Sent to the destination card when you open a stack. | preOpenStack |
suspendStack | Sent to the current card when something makes its stack no longer the active window. | suspendStack |
queryRecordChanged | Sent to the current card of a stack containing a query object when that query object has been updated. | queryRecordChanged <pObjectName> |
dragLeave | Sent when the mouse pointer moves out of an object during a drag and drop. | dragLeave |
socketTimeout | Sent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property. | socketTimeout <pSocketID> |
selectedObjectChanged | Sent to an object when it is selected. | selectedObjectChanged |
dragEnter | Sent when the mouse pointer moves into an object during a drag and drop. | dragEnter |
enterKey | Sent when the user presses the Enter key, if there is no text selection. | enterKey |
systemAppearanceChanged | Sent to the current card of the defaultStack when the systemAppearance changes. | systemAppearanceChanged |
backspaceKey | Sent to the active control, or to the current card if no control is focused. | backspaceKey |
escapeKey | Sent when the user presses the Escape key. | escapeKey |
newCard | Sent to a new card right after it's created. | newCard |
moveStack | Sent to the current card when the user moves the stack window. | moveStack <pNewStackH>, <pNewStackV> |
preOpenCard | Sent to a card when you go to the card. | preOpenCard |
copyKey | Sent when the user presses the key combination equivalent to the Copy menu item. | copyKey |
mouseRelease | Sent when the user releases the mouse outside the control that was clicked. | mouseRelease <pButtonNumber> |
arrowKey | Sent to the active control, or to the current card if no control is focused, when the user presses an arrow key. | arrowKey <pKey> |
pasteKey | Sent when the user presses the key combination equivalent to the "Paste" menu item. | pasteKey |
unIconifyStack | Sent when a stack is un-minimized. | unIconifyStack |
mouseDown | Sent when the user presses the mouse button. | mouseDown <pButtonNumber> |
mouseEnter | Sent when the mouse pointer moves into an object. | mouseEnter |
openCard | Sent to a card right after you go to the card. | openCard |
deleteKey | Sent to the active (focused) control(glossary), or to the current card if there is no active control. | deleteKey |
shutdown | Sent to the current card of the defaultStack when the application is quitting. | shutdown |
suspend | Sent to the current card when the application moves to the background. | suspend |
mouseUp | Sent when the user releases the mouse button. | mouseUp <pButtonNumber> |
closeStack | Sent to the current card when the stack closes. | closeStack |
dragMove | Sent when the user moves the mouse during a drag and drop. | dragMove |
cutKey | Sent when the user presses the key combination equivalent to the Cut menu item. | cutKey |
mouseStillDown | Sent periodically while the mouse button is being held down. | mouseStillDown <pButtonNumber> |
newStack | Sent to the current card of a new stack right after the stack is created. | newStack |
resumeStack | Sent to the current card when a stack window is brought to the front. | resumeStack |
resizeStack | Sent to the current card when the stack window is resized. | resizeStack <pNewWidth>, <pNewHeight>, <pOldWidth>, <pOldHeight> |
deleteStack | Sent to the current card of a stack that's about to be deleted. | deleteStack |
closeCard | Sent to the current card when the user goes to another card. | closeCard |
mouseMove | Sent when the user moves the mouse. | mouseMove <pNewMouseH>, <pNewMouseV> |
revXMLStartTree | Sent to the current card when the revXMLCreateTreeFromFile function starts parsing an XML document. | revXMLStartTree |
appleEvent | the current card whenever the application receives an Apple event. | appleEvent <pClass>, <pID>, <pSender> |
keyDown | Sent when the user presses a key. | keyDown <pKeyName> |
mouseLeave | Sent when the mouse pointer moves out of an object. | mouseLeave |
socketClosed | Sent when the remote system closes a socket. | socketClosed <pSocketID> |
mouseDoubleUp | Sent when the mouse button is released at the end of a double-click. | mouseDoubleUp <pButtonNumber> |
keyUp | Sent when the user releases a pressed key. | keyUp <pKeyName> |
mouseDownInBackdrop | Sent when the user presses the mouse button while the mouse pointer is in the backdrop. | mouseDownInBackdrop <pButtonNumber> |
mouseDoubleDown | Sent when the user double-clicks. | mouseDoubleDown <pButtonNumber> |
preOpenBackground | Sent to the current card when you go from a card that does not have a group to a card that does. | preOpenBackground <pBackgroundID> |
deleteCard | Sent to a card just before it is removed from the stack. | deleteCard |
desktopChanged | Sent to the current card of the defaultStack whenever the screenRect function changes. | desktopChanged |
objectSelectionStarted | Sent when, in edit mode, the user drags over a control | objectSelectionStarted |
Property
Name | Summary | Syntax |
---|---|---|
mark | Specifies whether a card has been marked for later access by the sort, go, or print commands. | set the mark of <card> to {true | false} |
topRight | Specifies the location of the specified object's upper right corner. | set the topRight of <object> to <right>, <top> |
formattedWidth | Reports 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> |
cantDelete | Specifies whether an object can be deleted. | set the cantDelete of {<card> | <group> | <stack>} to {true | false} |
script | Specifies the contents of an object's **script**. | set the script of <object> to <string> |
borderColor | Specifies 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>} |
hilitePixel | Specifies 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> |
patterns | Specifies all the patterns of an object, in shorthand form. | set the patterns of <object> to <patternsList> |
number | Specifies 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> |
topLeft | Specifies the location of the specified object's upper left corner. | set the topLeft of <object> to left,top |
altID | Specifies an alternate ID for objects. | set the altID of <object> to <IDNumber> |
right | Specifies how far an object's right edge is from the left edge of the window or screen. | set the right of <object> to <pixels> |
focusPattern | Specifies 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} |
topPattern | Specifies the pattern used to draw a three-D object's raised edge. | set the topPattern of <object> to {<patternNumber> | <imageID> | empty} |
foregroundColor | Specifies 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>} |
borderPixel | Specifies which entry in the color table is used for the color of an object's border. | set the borderPixel of <object> to <colorNumber> |
showPict | This property is included in LiveCode for compatibility with imported HyperCard stacks. | set the showPict of <card> to {true | false} |
shadowPixel | Specifies 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> |
behavior | Allows an object to inherit its script handlers from another object. | set the behavior of <object> to {<button> | <stack>} |
customProperties | Specifies 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> |
shadowColor | Specifies the color of an object's drop shadow or the background of a scrollbar. | set the shadowColor of <object> to {empty | <colorName> | <RGBColor>} |
textSize | Specifies 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> |
formattedRect | Reports 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> |
shadowOffset | Specifies the size and direction of an object's drop shadow. | set the shadowOffset of <object> to <pixels> |
textFont | Specifies 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>] |
backgroundColor | Specifies 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>} |
hiliteColor | Specifies the color of the background when an object, or text in an object, is highlighted. | set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>} |
sharedGroupNames | Reports the names of all the shared groups of the card or stack | get the sharedGroupNames of {<card> | <stack>} |
dontSearch | Specifies whether the find command skips a field, group, or card. | set the dontSearch of <field> to {true | false} |
defaultButton | Reports the long ID of the current card's default button. | get the defaultButton of <card> |
sharedGroupIds | Reports the ids of all the shared groups of the card or stack | get the sharedGroupIds of {<card> | <stack>} |
bottomPattern | Specifies the pattern of a three-D object's lowered edge. | set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>} |
customPropertySets | Lists all the custom property sets that can apply to an object. | get the customPropertySets of <object> |
hilitePattern | Specifies 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} |
visible | Specifies whether an object can be seen or is hidden. | set the [effective] visible of <object> to {true | false} |
shadowPattern | Specifies the pattern of an object's drop shadow. | set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty} |
layer | Specifies 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} |
backgroundPattern | The **backgroundPattern** specifies the pattern used to draw an object's background. | set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty} |
topColor | Specifies the color of a three-D object's raised edge. | set the topColor of <object> to {empty | <colorName> | <RGBColor>} |
groupNames | Reports the groups on a card. | get the groupNames of <card> |
bottom | Specifies how far an object's bottom edge is from the top of the window or screen. | set the bottom of <object> to <number> |
borderPattern | Specifies the pattern of an object's border. | set the borderPattern of <object> to {empty | <patternNumber> | <imageID>} |
height | Specifies the distance from an object's top edge to its bottom edge. | set the height of <object> to <numberOfPixels> |
bottomPixel | Specifies 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> |
top | Specifies how far an object's top edge is from the top of the window or screen. | set the top of <object> to <numberOfPixels> |
rectangle | Specifies the area within which an object is drawn. | set the rectangle of <object> to <left>, <top>, <right>, <bottom> get the [effective] rectangle of <object> |
invisible | Specifies whether an object is hidden. | set the invisible of <object> to {true | false} get the [effective] invisible of <object> |
topPixel | Specifies 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> |
bottomRight | Specifies the location of the specified object's lower right corner. | set the bottomRight of <object> to right,bottom |
formattedLeft | Reports 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> |
foregroundPixel | Specifies which entry in the color table is used for an object's text and borders. | set the foregroundPixel of <object> to <colorNumber> |
bottomLeft | Specifies the location of the specified object's lower left corner. | set the bottomLeft of <object> to <left>, <bottom> |
location | Specifies where an object is. | set the location of <object> to <point> |
left | Specifies how far an object's left edge is from the left edge of the window or screen. | set the left of <object> to <numberOfPixels> |
showFocusBorder | Displays a border around the active control. | set the showFocusBorder of <control> to {true | false} |
groupIDs | Reports the groups on a card. | get the groupIDs of <card> |
selected | Specifies whether an object is **selected**. | set the selected of <object> to {true | false} |
properties | Specifies some of an object's **properties** and their current values. | set the properties of <object> to <propertiesArray> |
colors | Specifies all the colors of an object, in shorthand form. | set the colors of <object> to <colorsList> |
ID | Reports the unique ID number assigned to an object. | set the ID of {image | stack} to <number> get the [{ long | abbreviated | short }] ID of <object> |
backgroundPixel | Specifies which entry in the color table is used for an object's background color. | set the backgroundPixel of <object> to <colorNumber> |
formattedTop | Reports 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> |
focusPixel | Specifies 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> |
bottomColor | Specifies the color of a three-D object's lowered edge. | set the bottomColor of <object> to {empty | <colorName> | <RGBColor>} |
textStyle | Specifies 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} |
threeD | Specifies whether an object appears to stick out of or recede into the screen. | set the threeD of <object> to {true | false} |
width | The **width** of an object is the distance from its left edge to its right edge. | set the width of <object> to <numberOfPixels> |
showBorder | Specifies whether an outline is drawn around an object. | set the showBorder of <object> to {true | false} |
name | Specifies the name of an object. | set the [{ long | abbreviated | short }] name of <object> to <string> get the name |
owner | Reports which object is next in the object hierarchy. | get the [{ long | abbreviated | short }] owner of <object> |
formattedHeight | Reports 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> |
focusColor | Specifies 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>} |
customKeys | Lists the names of all the custom properties of an object. | set the customKeys of <object> to {<propertiesList> | empty} |
foregroundPattern | Specifies 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} |