<doc>
  <legacy_id>1609</legacy_id>
  <name>clickField</name>
  <type>function</type>
  <syntax>
    <example>the clickField</example>
    <example>clickField()</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
  </classification>
  <references>
    <function tag="clickStack">clickStack Function</function>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> the number of the last <keyword tag="field">field</keyword> the user clicked.</summary>
  <examples>
    <example>the clickField</example>
    <example>if the clickField is field "New Items" then exit mouseUp</example>
  </examples>
  <description>
    <p>Use the <b>clickField</b> <control_st tag="function">function</control_st> within a <message tag="mouseDown">mouseDown</message>, <message tag="mouseUp">mouseUp</message>, or <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine which <keyword tag="field">field</keyword> the user clicked, in order to provide <glossary tag="hypertext">hypertext</glossary> (clickable text) or take some action based on the click.</p><p/><p><b>Value:</b></p><p>The <b>clickField</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> the <function tag="number">number</function> of the clicked <keyword tag="field">field</keyword>.</p><p/><p><b>Comments:</b></p><p>The <b>clickField</b> <control_st tag="function">function</control_st> is cleared at the next mouse click, as well as after some editing actions such as deleting text. If the last click was not in a <keyword tag="field">field</keyword>, the <b>clickField</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> empty.</p><p/><p>The returned value indicates the field that the mouse pointer was over when the mouse was clicked. Moving the mouse before the mouse button is released does not affect the value returned by the <b>clickField</b>.</p><p/><p>If the field is locked, the <b>clickField</b> function is most useful within a <glossary tag="handler">handler</glossary> (such as <message tag="mouseDown">mouseDown</message> or <message tag="mouseUp">mouseUp</message>) that is <glossary tag="trigger">triggered</glossary> by the mouse click.</p><p/><p>If the field is unlocked, <b>mouseDown</b> and <message tag="mouseUp">mouseUp</message> <glossary tag="message">messages</glossary> are not sent when the user clicks in the <keyword tag="field">field</keyword> (unless the user right-clicks or holds down the Control key while clicking). Use the <b>clickField</b> function within a <message tag="selectionChanged">selectionChanged</message> <glossary tag="handler">handler</glossary> to determine what <keyword tag="field">field</keyword> the user is editing.</p>
  </description>
</doc>