Livecode Wiki
Register
Advertisement

Sent to the current card when you go from a card that does not have a group to a card that does.Syntax:

preOpenBackground <backgroundID>

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

Handle the preOpenBackground message to update a background's appearance before the background appears on screen.

The actual navigation is not triggered by the preOpenBackground message, so trapping 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.

Parameters:

  • backgroundID: The short ID property of the background being opened.

See also: openControl (message),openBackground (message),closeBackground (message),preOpenCard (message),

Advertisement