<doc>
  <legacy_id>1172</legacy_id>
  <name>default</name>
  <type>property</type>
  <syntax>
    <example>set the default of <i>button</i> to {true | false}</example>
  </syntax>
  <library></library>
  <objects>
    <button/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <message tag="enterInField">enterInField Message</message>
    <keyword tag="default">default Keyword</keyword>
    <property tag="acceleratorKey">acceleratorKey Property</property>
    <property tag="defaultButton">defaultButton Property</property>
    <property tag="dialogData">dialogData 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>Specifies that a <keyword tag="button">button</keyword> will be automatically chosen when the user presses Return or Enter.</summary>
  <examples>
    <example>set the default of button "OK" to true</example>
    <example>set the default of button otherButton to false</example>
  </examples>
  <description>
    <p>Use the <b>default</b> <glossary tag="property">property</glossary> when designing <glossary tag="card">cards</glossary> to be used as <glossary tag="dialog box">dialog boxes</glossary>. The familiar <glossary tag="appearance">appearance</glossary> of the default button is a cue to users about what to expect when they use the shortcut of pressing Return or Enter.</p><p/><p><b>Value:</b></p><p>The <b>default</b> of a <keyword tag="button">button</keyword> is true or false.</p><p/><p>By default, the <b>default</b> <glossary tag="property">property</glossary> of newly created <glossary tag="button">buttons</glossary> is set to false.</p><p/><p><b>Comments:</b></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 <keyword tag="button">button</keyword> whose <b>default</b> <glossary tag="property">property</glossary> is true. (Also <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 even if there is a text <glossary tag="insertion point">insertion point</glossary> or a <keyword tag="control">control</keyword> is <glossary tag="focus">focused</glossary>.)</p><p/><p>If more than one button's <b>default</b> is true, the <keyword tag="message box">message</keyword> is sent to the <keyword tag="button">button</keyword> whose <b>default</b> <glossary tag="property">property</glossary> was set to true most recently.</p><p/><p>Changing a button's <b>default</b> <glossary tag="property">property</glossary> increases its size, so it also changes its <keyword tag="rectangle">rectangle</keyword> (and related <property tag="properties">properties</property>). Changing the <b>default</b> <glossary tag="property">property</glossary> does not change the <glossary tag="button">button's</glossary> <property tag="location">location</property>.</p><p/><p><code/><img src="202652"/> <b>Cross-platform note:</b><code/> On <glossary tag="OS X">OS X systems</glossary>, the default button throbs rhythmically instead of having a border. Because the throbbing <keyword tag="button">button</keyword> is drawn by the operating system, its apppearance may not be correct if the <keyword tag="button">button</keyword> is placed on top of another <keyword tag="control">control</keyword>. To avoid minor cosmetic problems, place default <glossary tag="button">buttons</glossary> directly on the <keyword tag="card">card</keyword> rather than on top of other <glossary tag="object">objects</glossary>.</p>
  </description>
</doc>