card

Typeobject
DictionaryLCS
LibraryLiveCode Script
Syntax
card
Synonymscd
Summary

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

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
go to first card
set the marked of this card to true
RelatedKeyword: templateCard
Glossary: stack window, object type
Object: stack, control
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.

Tagsobjects
TypeNameSummarySyntax
messageappleEvent

the current card whenever the application receives an Apple event.

appleEvent <pClass>, <pID>, <pSender>

- - -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>

- - -backspaceKey

Sent to the active control, or to the current card if no control is focused.

backspaceKey

- - -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>

- - -closeCard

Sent to the current card when the user goes to another card.

closeCard

- - -closeStack

Sent to the current card when the stack closes.

closeStack

- - -closeStackRequest

Sent to the current card when the user tries to close a stack.

closeStackRequest

- - -commandKeyDown

Sent when a Command key combination (Control-key on Unix or Windows) is pressed.

commandKeyDown <pKeyName>

- - -controlKeyDown

Sent when a Control key combination is pressed.

controlKeyDown <pKeyName>

- - -copyKey

Sent when the user presses the key combination equivalent to the Copy menu item.

copyKey

- - -cutKey

Sent when the user presses the key combination equivalent to the Cut menu item.

cutKey

- - -deleteCard

Sent to a card just before it is removed from the stack.

deleteCard

- - -deleteKey

Sent to the active (focused) control(glossary), or to the current card if there is no active control.

deleteKey

- - -deleteStack

Sent to the current card of a stack that's about to be deleted.

deleteStack

- - -desktopChanged

Sent to the current card of the defaultStack whenever the screenRect function changes.

desktopChanged

- - -dragDrop

Sent to the object where data was dropped when a drag and drop finishes.

dragDrop

- - -dragEnter

Sent when the mouse pointer moves into an object during a drag and drop.

dragEnter

- - -dragLeave

Sent when the mouse pointer moves out of an object during a drag and drop.

dragLeave

- - -dragMove

Sent when the user moves the mouse during a drag and drop.

dragMove

- - -editScript

Sent to the current card when the object's script is opened with the edit command.

editScript <pObjectID>, <pAtItems>

- - -enterKey

Sent when the user presses the Enter key, if there is no text selection.

enterKey

- - -escapeKey

Sent when the user presses the Escape key.

escapeKey

- - -functionKey

Sent when the user presses a function key.

functionKey <pKeyNumber>

- - -iconifyStack

Sent to the current card when a stack is minimized.

iconifyStack

- - -idle

Sent periodically to the current card if no other message is being sent.

idle

- - -keyDown

Sent when the user presses a key.

keyDown <pKeyName>

- - -keyUp

Sent when the user releases a pressed key.

keyUp <pKeyName>

- - -layoutUpdated

Message sent to card after UI update.

layoutUpdated <pMediaQueryArray>

- - -mouseDoubleDown

Sent when the user double-clicks.

mouseDoubleDown <pButtonNumber>

- - -mouseDoubleUp

Sent when the mouse button is released at the end of a double-click.

mouseDoubleUp <pButtonNumber>

- - -mouseDown

Sent when the user presses the mouse button.

mouseDown <pButtonNumber>

- - -mouseDownInBackdrop

Sent when the user presses the mouse button while the mouse pointer is in the backdrop.

mouseDownInBackdrop <pButtonNumber>

- - -mouseEnter

Sent when the mouse pointer moves into an object.

mouseEnter

- - -mouseLeave

Sent when the mouse pointer moves out of an object.

mouseLeave

- - -mouseMove

Sent when the user moves the mouse.

mouseMove <pNewMouseH>, <pNewMouseV>

- - -mouseRelease

Sent when the user releases the mouse outside the control that was clicked.

mouseRelease <pButtonNumber>

- - -mouseStillDown

Sent periodically while the mouse button is being held down.

mouseStillDown <pButtonNumber>

- - -mouseUp

Sent when the user releases the mouse button.

mouseUp <pButtonNumber>

- - -mouseUpInBackdrop

Sent when the user releases the mouse button, while the mouse pointer is in the backdrop.

mouseUpInBackdrop <pButtonNumber>

- - -mouseWithin

Sent periodically to an object while the mouse pointer is within its borders.

mouseWithin

- - -moveStack

Sent to the current card when the user moves the stack window.

moveStack <pNewStackH>, <pNewStackV>

- - -nameChanged

Sent to an object when its name is changed.

nameChanged <pOldName>, <pNewName>

- - -newCard

Sent to a new card right after it's created.

newCard

- - -newStack

Sent to the current card of a new stack right after the stack is created.

newStack

- - -newTool

Sent to the caller of choose when a different tool is chosen.

newTool <pToolName>

- - -objectSelectionEnded

Sent when, in edit mode, the user completes a drag action used to select controls.

objectSelectionEnded

- - -objectSelectionStarted

Sent when, in edit mode, the user drags over a control

objectSelectionStarted

- - -openCard

Sent to a card right after you go to the card.

openCard

- - -openStack

Sent to the destination card right after you open a stack.

openStack

- - -optionKeyDown

Sent when the user presses an Option key, Meta key, or Alt key combination.

optionKeyDown <pKeyName>

- - -pasteKey

Sent when the user presses the key combination equivalent to the "Paste" menu item.

pasteKey

- - -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>

- - -preOpenCard

Sent to a card when you go to the card.

preOpenCard

- - -preOpenStack

Sent to the destination card when you open a stack.

preOpenStack

- - -queryRecordChanged

Sent to the current card of a stack containing a query object when that query object has been updated.

queryRecordChanged <pObjectName>

- - -resizeStack

Sent to the current card when the stack window is resized.

resizeStack <pNewWidth>, <pNewHeight>, <pOldWidth>, <pOldHeight>

- - -resume

Sent to the current card when the application is brought to the foreground.

resume

- - -resumeStack

Sent to the current card when a stack window is brought to the front.

resumeStack

- - -revEndXMLNode

Sent to the current card when the revXMLCreateTreeFromFile function encounters a closing tag while parsing an XML file.

revEndXMLNode <pNodeName>

- - -revStartXMLData

Sent to the current card when the revXMLCreateTree or revXMLCreateTreeFromFile function encounters data between tags while parsing an XML document.

revStartXMLData <pElementData>

- - -revStartXMLNode

Sent to the current card when the revXMLCreateTreeFromFile function encounters an opening tag while parsing an XML file.

revStartXMLNode <pNodeName>, <pNodeAttributes>

- - -revXMLEndTree

Sent to the current card when the revXMLCreateTreeFromFile function finishes parsing an XML document.

revXMLEndTree

- - -revXMLStartTree

Sent to the current card when the revXMLCreateTreeFromFile function starts parsing an XML document.

revXMLStartTree

- - -saveStackRequest

Sent to the current card when the stack is about to be saved.

saveStackRequest

- - -selectedObjectChanged

Sent to an object when it is selected.

selectedObjectChanged

- - -shutdown

Sent to the current card of the defaultStack when the application is quitting.

shutdown

- - -shutdownRequest

Sent to the current card of the defaultStack when the user tries to quit the application.

shutdownRequest

- - -signal

Sent to the current card when another process sends a kill signal to the application.

signal <pSigNumber>

- - -socketClosed

Sent when the remote system closes a socket.

socketClosed <pSocketID>

- - -socketError

Sent when an error occurs on a socket that causes the socket to close or to fail to open.

socketError <pSocketID>, <pErrorString>

- - -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>

- - -suspend

Sent to the current card when the application moves to the background.

suspend

- - -suspendStack

Sent to the current card when something makes its stack no longer the active window.

suspendStack

- - -systemAppearanceChanged

Sent to the current card of the defaultStack when the system appearance|systemAppearance changes.

systemAppearanceChanged

- - -tabKey

Sent when the user presses the Tab key.

tabKey

- - -undoChanged

Sent to the current card when the Undo action changes.

undoChanged

- - -unIconifyStack

Sent when a stack is un-minimized.

unIconifyStack

propertyallowableOrientations

Specify the orientations that are supported on these card.

get the allowableOrientations of card

set the allowableOrientations of card to {"portrait" | "portrait upside down" | "landscape left" | "landscape right" | "any"}

- - -altID

Specifies an alternate ID for objects.

set the altID of <object> to <IDNumber>

- - -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>}

- - -backgroundPattern

The backgroundPattern specifies the pattern used to draw an object's background.

set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -backgroundPixel

Specifies which entry in the color table is used for an object's background color.

set the backgroundPixel of <object> to <colorNumber>

- - -behavior

Allows an object to inherit its script handlers from another object.

set the behavior of <object> to {<button> | <stack>}

- - -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>}

- - -borderPattern

Specifies the pattern of an object's border.

set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -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>

- - -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>

- - -bottomColor

Specifies the color of a three-D object's lowered edge.

set the bottomColor of <object> to {empty | <colorName> | <RGBColor>}

- - -bottomLeft

Specifies the location of the specified object's lower left corner.

set the bottomLeft of <object> to <left>, <bottom>

- - -bottomPattern

Specifies the pattern of a three-D object's lowered edge.

set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -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>

- - -bottomRight

Specifies the location of the specified object's lower right corner.

set the bottomRight of <object> to right,bottom

- - -cantDelete

Specifies whether an object can be deleted.

set the cantDelete of {<card> | <group> | <stack>} to {true | false}

- - -colors

Specifies all the colors of an object, in shorthand form.

set the colors of <object> to <colorsList>

- - -content

Defines how the controls belonging to the group or card are arranged.

set the content[propertyName] of object to propertyValue

get the content[propertyName] of object

- - -content align

Set the align of all the children of a group or of a card.

set the content["type"] of object to "align"

- - -content center

Center all the children in a group or card with respect to these.

set the content["type"] of object to "center"

- - -cursorHover

Specifies the mouse cursor to be displayed when pointing over a control.

get the cursorHover of object

set the cursorHover of object to {cursorName | imageID}

- - -customKeys

Lists the names of all the custom properties of an object.

set the customKeys of <object> to {<propertiesList> | empty}

- - -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>

- - -customPropertySets

Lists all the custom property sets that can apply to an object.

get the customPropertySets of <object>

- - -defaultButton

Reports the long ID of the current card's default button.

get the defaultButton of <card>

- - -dontSearch

Specifies whether the find command skips a field, group, or card.

set the dontSearch of <field> to {true | false}

- - -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>}

- - -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}

- - -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>

- - -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>}

- - -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}

- - -foregroundPixel

Specifies which entry in the color table is used for an object's text and borders.

set the foregroundPixel of <object> to <colorNumber>

- - -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>

- - -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>

- - -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>

- - -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>

- - -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>

- - -groupIDs

Reports the groups on a card.

get the groupIDs of <card>

- - -groupNames

Reports the groups on a card.

get the groupNames of <card>

- - -height

Specifies the distance from an object's top edge to its bottom edge.

set the height of <object> to <numberOfPixels>

- - -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>}

- - -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}

- - -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>

- - -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>

- - -initialOrientation

Sets the orientation the card layout will have when opened.

get the initialOrientation of card

set the initialOrientation of card to {"portrait" | "landscape"}

- - -invisible

Specifies whether an object is hidden.

set the invisible of <object> to {true | false}

get the [effective] invisible of <object>

- - -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}

- - -layoutBreakpoints

Gets the list of layout breakpoints that the object has.

get the layoutBreakpoints of object

- - -layoutColumns

Gets the number of columns in the card layout.

get the layoutColumns of object

- - -layoutDebugger

Displays messages that help detect possible layout errors.

get the layoutDebugger of card

set the layoutDebugger of card to {true | false}

- - -layoutPadding

Sets the padding space required by all sides of a control.

get the layoutPadding of object

set the layoutPadding of object to {pixels | horizontal, vertical | left, top, right, bottom}

- - -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>

- - -location

Specifies where an object is.

set the location of <object> to <point>

- - -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}

- - -name

Specifies the name of an object.

set the [{ long | abbreviated | short }] name of <object> to <string>

get the name

- - -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>

- - -order

The order that has a control within its owner.

get the order of object

set the order of object to {<integer>}

- - -owner

Reports which object is next in the object hierarchy.

get the [{ long | abbreviated | short }] owner of <object>

- - -patterns

Specifies all the patterns of an object, in shorthand form.

set the patterns of <object> to <patternsList>

- - -properties

Specifies some of an object's properties and their current values.

set the properties of <object> to <propertiesArray>

- - -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>

- - -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>

- - -script

Specifies the contents of an object's script.

set the script of <object> to <string>

- - -selected

Specifies whether an object is selected.

set the selected of <object> to {true | false}

- - -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>}

- - -shadowOffset

Specifies the size and direction of an object's drop shadow.

set the shadowOffset of <object> to <pixels>

- - -shadowPattern

Specifies the pattern of an object's drop shadow.

set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -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>

- - -sharedGroupIds

Reports the ids of all the shared groups of the card or stack

get the sharedGroupIds of {<card> | <stack>}

- - -sharedGroupNames

Reports the names of all the shared groups of the card or stack

get the sharedGroupNames of {<card> | <stack>}

- - -showBorder

Specifies whether an outline is drawn around an object.

set the showBorder of <object> to {true | false}

- - -showFocusBorder

Displays a border around the active control.

set the showFocusBorder of <control> to {true | false}

- - -showPict

This property is included in LiveCode for compatibility with imported HyperCard stacks.

set the showPict of <card> to {true | false}

- - -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>]

- - -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>

- - -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}

- - -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>

- - -topColor

Specifies the color of a three-D object's raised edge.

set the topColor of <object> to {empty | <colorName> | <RGBColor>}

- - -topLeft

Specifies the location of the specified object's upper left corner.

set the topLeft of <object> to left,top

- - -topPattern

Specifies the pattern used to draw a three-D object's raised edge.

set the topPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -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>

- - -topRight

Specifies the location of the specified object's upper right corner.

set the topRight of <object> to <right>, <top>

- - -visible

Specifies whether an object can be seen or is hidden.

set the [effective] visible 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>