<doc>
  <legacy_id>1456</legacy_id>
  <name>preOpenBackground</name>
  <type>message</type>
  <syntax>
    <example>preOpenBackground <i>backgroundID</i></example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
  </classification>
  <references>
    <message tag="preOpenCard">preOpenCard Message</message>
    <message tag="openBackground">openBackground Message</message>
    <message tag="closeBackground">closeBackground Message</message>
    <message tag="openControl">openControl Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Sent to the <glossary tag="current card">current card</glossary> when you go from a <keyword tag="card">card</keyword> that does not have a <command tag="group">group</command> to a <keyword tag="card">card</keyword> that does.</summary>
  <examples>
    <example>on preOpenBackground theGroup <code><i>-- move the group's position</i></code></p><p>  if the short name of background ID theGroup is "Navigation"</p><p>  then set the bottom of group "Navigation" to the height of this card</p><p>end preOpenBackground</example>
  </examples>
  <description>
    <p>Handle the <b>preOpenBackground</b> <keyword tag="message box">message</keyword> to update a <glossary tag="background">background's</glossary> appearance before the <object tag="group">background</object> appears on screen.</p><p/><p><b>Parameters:</b></p><p>The <i>backgroundID</i> is the short <property tag="ID">ID</property> property of the <object tag="group">background</object> being opened.</p><p/><p><b>Comments:</b></p><p>The actual navigation is not triggered by the <b>preOpenBackground</b> <keyword tag="message box">message</keyword>, so <glossary tag="trap">trapping</glossary> the <keyword tag="message box">message</keyword> and not allowing it to <control_st tag="pass">pass</control_st> does not prevent the <keyword tag="card">card</keyword> with the <command tag="group">group</command> from opening.</p><p>For each <command tag="group">group</command> on the card that was not on the previously visited card, a <b>preOpenBackground</b> <keyword tag="message box">message</keyword> (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 <command tag="group">group</command> which handles the <keyword tag="message box">message</keyword> should be careful to check that the ID matches itself to prevent inadvertantly trappng a message intended for a different group.</p>
  </description>
</doc>