<doc>
  <legacy_id>1448</legacy_id>
  <name>preOpenCard</name>
  <type>message</type>
  <syntax>
    <example>preOpenCard</example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Navigation &amp; Hypertext</category>
  </classification>
  <references>
    <message tag="closeCard">closeCard Message</message>
    <message tag="openCard">openCard Message</message>
    <message tag="preOpenBackground">preOpenBackground Message</message>
    <message tag="preOpenStack">preOpenStack 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 a <keyword tag="card">card</keyword> when you go to the <keyword tag="card">card</keyword>.</summary>
  <examples>
    <example>on preOpenCard <code><i>-- highlight the "go to this card" button in a set</i></code></p><p>  set the hilitedButton of group "Cards" to the number of this card</p><p>  pass preOpenCard</p><p>end preOpenCard</example>
  </examples>
  <description>
    <p>Handle the <b>preOpenCard</b> <keyword tag="message box">message</keyword> to update a <glossary tag="card">card's</glossary> appearance before the <keyword tag="card">card</keyword> appears on screen.</p><p/><p><b>Comments:</b></p><p>The <b>preOpenCard</b> <keyword tag="message box">message</keyword> is sent before the <message tag="openCard">openCard</message> <keyword tag="message box">message</keyword>. Unlike <message tag="openCard">openCard</message>, <b>preOpenCard</b> <glossary tag="handler">handlers</glossary> are <glossary tag="execute">executed</glossary> before the <keyword tag="card">card</keyword> appears. Because of this, the <b>preOpenCard</b> <glossary tag="handler">handler</glossary> is a good place to put code that adjusts the size, position, and appearance of <glossary tag="object">objects</glossary>; the changes are made before the <keyword tag="card">card</keyword> appears.</p><p/><p>The actual navigation is not triggered by the <b>preOpenCard</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> from opening.</p>
  </description>
</doc>