<doc>
  <legacy_id>1406</legacy_id>
  <name>defaultButton</name>
  <type>property</type>
  <syntax>
    <example>get the defaultButton of <i>card</i></example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <property tag="default">default Property</property>
  </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>Reports the long <property tag="ID">ID</property> of the <glossary tag="current card">current card's</glossary> default <keyword tag="button">button</keyword>.</summary>
  <examples>
    <example>send mouseUp to the defaultButton of this card</example>
  </examples>
  <description>
    <p>Use the <b>defaultButton</b> <glossary tag="property">property</glossary> to find out which <keyword tag="button">button</keyword> on a <keyword tag="card">card</keyword> is designated as the <keyword tag="button">button</keyword> to be clicked when the user presses the Return or Enter key.</p><p/><p><b>Value:</b></p><p>The <b>defaultButton</b> of a <keyword tag="card">card</keyword> is the long <property tag="ID">ID</property> <glossary tag="property">property</glossary> of a <keyword tag="button">button</keyword>.</p><p/><p>This property is read-only and cannot be set.</p><p/><p><b>Comments:</b></p><p>The <b>defaultButton</b> <glossary tag="property">property</glossary> <glossary tag="return">returns</glossary> the long <property tag="ID">ID</property> of the <keyword tag="button">button</keyword> whose <keyword tag="default">default</keyword> <glossary tag="property">property</glossary> is set to true.</p><p/><p>When the user presses Enter or Return and there is no active control, LiveCode sends a <b>mouseUp</b> <keyword tag="message box">message</keyword> to the <b>defaultButton</b>. (If the <keyword tag="card">card</keyword> contains an editable <keyword tag="field">field</keyword>, <glossary tag="handle">handle</glossary> the <message tag="returnInField">returnInField</message> and <message tag="enterInField">enterInField</message> messages to ensure that the default <keyword tag="button">button</keyword> is activated.)</p><p/><p>If more than one button's <b>default</b> is true, the <b>defaultButton</b> <glossary tag="property">property</glossary> reports the <property tag="ID">ID</property> of the <keyword tag="button">button</keyword> whose <keyword tag="default">default</keyword> <glossary tag="property">property</glossary> was set to true most recently. This <glossary tag="property">property</glossary> reports empty if there is no default <keyword tag="button">button</keyword>.</p>
  </description>
</doc>