<doc>
  <legacy_id>3521</legacy_id>
  <name>preOpenControl</name>
  <type>message</type>
  <syntax>
    <example>preOpenControl</example>
  </syntax>
  <library></library>
  <objects>
    <group/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <message tag="openControl">openControl Message</message>
    <command tag="dispatch">dispatch Command</command>
  </references>
  <history>
    <introduced version="3.5">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Sent to a <command tag="group">group</command> when you go to the <keyword tag="card">card</keyword> that contains it and to a <property tag="backgroundBehavior">background group</property> when going from a card which it is not placed on to one where it is.</summary>
  <examples>
    <example>on preOpenControl</p><p>  resizeMyObjects</p><p>  put empty into field "Customer Address" of me</p><p>end preOpenControl</example>
  </examples>
  <description>
    <p>Handle the <b>preOpenControl</b> message to update a group's appearance before it appears on screen.</p>
<p>&nbsp;</p>
<p><b>Comments:</b></p>
<p>For groups with their <property tag="backgroundBehavior">backgroundBehavior property</property> set to true, the <b>preOpenControl</b> message is sent immediately after the <message tag="preOpenBackground">preOpenBackground message</message> is sent to the <object tag="card">card</object> being opened. For non-background groups, it is sent after the <message tag="preOpenCard">preOpenCard message</message>.</p>
<p>&nbsp;</p>
<p>For nested groups, the <b>preOpenControl</b> message is sent to the parent group first, if it is passed or not handled by the parent group, then it passes through each child group in reverse layer order (i.e from highest to lowest).</p>
<p>&nbsp;</p>
<p>The actual navigation is not triggered by the <b>preOpenControl</b> <keyword tag="message box">message</keyword>, so blocking the <keyword tag="message box">message</keyword> and not allowing it to <href tag="">pass</href> does not prevent the <keyword tag="card">card</keyword> with the <command tag="group">group</command> from opening.</p>
  </description>
</doc>