<doc>
  <legacy_id>2492</legacy_id>
  <name>newGroup</name>
  <type>message</type>
  <syntax>
    <example>newGroup</example>
  </syntax>
  <library></library>
  <objects>
    <group/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <command tag="copy">copy Command</command>
    <command tag="group">group Command</command>
    <command tag="paste">paste Command</command>
    <message tag="newBackground">newBackground Message</message>
    <command tag="clone">clone Command</command>
  </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 new <command tag="group">group</command> right after it's created.</summary>
  <examples>
    <example>on newGroup <code><i>-- automatically set a property of all new groups</i></code></p><p>  set the backgroundBehavior of the target to true</p><p>end newGroup</example>
  </examples>
  <description>
    <p>Handle the <b>newGroup</b> <keyword tag="message box">message</keyword> if you want to create <glossary tag="object">objects</glossary> or do other tasks when a new <command tag="group">group</command> is created.</p><p/><p><b>Comments:</b></p><p>Normally, the <b>newGroup</b> <keyword tag="message box">message</keyword> is handled at a higher level of the <glossary tag="message path">message path</glossary>, since the newly-created <command tag="group">group</command> does not yet have a <property tag="script">script</property> unless the <keyword tag="templateGroup">templateGroup</keyword> contains one.</p><p/><p>The actual creation is not triggered by the <b>newGroup</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 <command tag="group">group</command> from being created.</p><p/><p>A <b>newBackground</b> message is sent after the <b>newGroup</b> <keyword tag="message box">message</keyword>. (The <message tag="newBackground">newBackground</message> message is included for compatibility with <keyword tag="top">HyperCard</keyword>.)</p>
  </description>
</doc>