<doc>
  <legacy_id>1420</legacy_id>
  <name>mouseWithin</name>
  <type>message</type>
  <syntax>
    <example>mouseWithin</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
  </classification>
  <references>
    <command tag="focus">focus Command</command>
    <message tag="mouseLeave">mouseLeave 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 periodically to an <glossary tag="object">object</glossary> while the <glossary tag="mouse pointer">mouse pointer</glossary> is within its borders.</summary>
  <examples>
  </examples>
  <description>
    <p>Handle the <b>mouseWithin</b> <keyword tag="message box">message</keyword> to perform some repeating task (such as an update) for as long as the <glossary tag="mouse pointer">mouse pointer</glossary> is over a <keyword tag="control">control</keyword>.</p><p/><p><b>Comments:</b></p><p>The period between <b>mouseWithin</b> <glossary tag="message">messages</glossary> is specified by the <property tag="idleRate">idleRate</property> and <property tag="idleTicks">idleTicks</property> <property tag="properties">properties</property>.</p><p/><p>The <b>mouseWithin</b> <keyword tag="message box">message</keyword> is sent only when the <glossary tag="Browse tool">Browse tool</glossary> is being used.</p><p/><p>If two controls overlap, a <b>mouseWithin</b> <keyword tag="message box">message</keyword> is sent whenever the <glossary tag="mouse pointer">mouse pointer</glossary> is in a visible portion of a <keyword tag="control">control</keyword>. The <keyword tag="control">control</keyword> on the bottom receives a <b>mouseWithin</b> <keyword tag="message box">message</keyword> only when the <glossary tag="mouse pointer">mouse pointer</glossary> is in a portion of the <keyword tag="control">control</keyword> that can be seen. A <keyword tag="control">control</keyword> that is completely hidden by another <keyword tag="control">control</keyword> on top of it will never receive a <b>mouseWithin</b> <keyword tag="message box">message</keyword>.</p><p/><p>If the mouse button is down when the mouse pointer enters the control, no <b>mouseWithin</b> <glossary tag="message">messages</glossary> are sent until the mouse button is released. If the <glossary tag="mouse pointer">mouse pointer</glossary> leaves the <keyword tag="control">control</keyword> while the <glossary tag="mouse button">mouse button</glossary> is still down, no <b>mouseWithin</b> <glossary tag="message">messages</glossary> are sent. If the <glossary tag="mouse button">mouse button</glossary> is pressed while the <keyword tag="pointer">pointer</keyword> is in the <keyword tag="control">control</keyword>, however, <b>mouseWithin</b> <glossary tag="message">messages</glossary> continue to be sent, even while the <glossary tag="mouse button">mouse button</glossary> is down.</p><p/><p>Usually, it is easier and more efficient to use the <b>mouseMove</b> <keyword tag="message box">message</keyword> to track the movement of the mouse while the button is being held down. The <b>mouseWithin</b> <keyword tag="message box">message</keyword> is sent continually and must be handled several times a second, taking up a great deal of processor time. The <message tag="mouseMove">mouseMove</message> <keyword tag="message box">message</keyword> is sent only when the mouse is moved, making it more efficient.</p><p/><p><code/><b>Note:</b><code/> If there is no <b>mouseWithin</b> <glossary tag="handler">handler</glossary> in the target <glossary tag="object">object's</glossary> <property tag="script">script</property>, no <b>mouseWithin</b> <keyword tag="message box">message</keyword> is sent, even if there is a <b>mouseWithin</b> <glossary tag="handler">handler</glossary> in an <glossary tag="object">object</glossary> that's further along the <glossary tag="message path">message path</glossary>.</p>
  </description>
</doc>