Sent to the current card when you go from a card that does not have a group to a card that does.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
preOpenBackground pBackgroundID
# Params
- pBackgroundID : The short ID property of the background being opened.
# Examples
on preOpenBackground theGroup -- move the group's position if the short name of background ID theGroup is "Navigation" then set the bottom of group "Navigation" to the height of this card end preOpenBackground
# Description
Handle the preOpenBackground message to update a background appearance before the background appears on screen.
The actual navigation is not triggered by the preOpenBackground message, so trap the message and not allowing it to pass does not prevent the card with the group from opening. For each group on the card that was not on the previously visited card, a preOpenBackground message (with the group ID) is sent to the current card. If the card does not handle the message, or passes it, the message proceeds through each group in reverse layer order (from highest to lowest). Each group which handles the message should be careful to check that the ID matches itself to prevent inadvertantly trappng a message intended for a different group.
# Tags
# See
- **keyword:** card - **message:** openControl, openBackground, closeBackground, preOpenCard - **command:** group - **glossary:** trap, current card, message, background - **control structure:** pass