<doc>
  <legacy_id>1950</legacy_id>
  <name>menuButton</name>
  <type>function</type>
  <syntax>
    <example>the menuButton</example>
    <example>menuButton()</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>menuObject</synonym>
  </synonyms>
  <classification>
    <category>Menus</category>
  </classification>
  <references>
    <command tag="option">option Command</command>
    <keyword tag="me">me Keyword</keyword>
    <property tag="menuHistory">menuHistory Property</property>
    <property tag="menuMouseButton">menuMouseButton Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> the name of the <keyword tag="button">button</keyword> that <glossary tag="trigger">triggered</glossary> display of a <glossary tag="stack menu">stack menu</glossary>.</summary>
  <examples>
    <example>the menuButton</example>
    <example>hide the menuButton</example>
  </examples>
  <description>
    <p>Use the <b>menuButton</b> <control_st tag="function">function</control_st> within a <glossary tag="handler">handler</glossary> in a <glossary tag="stack menu">stack menu</glossary> to determine which <keyword tag="button">button</keyword> opened the <keyword tag="menu">menu</keyword>.</p><p/><p><b>Value:</b></p><p>The <b>menuButton</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> the <property tag="name">name</property> <glossary tag="property">property</glossary> of the <keyword tag="button">button</keyword>.</p><p/><p>You create a stack menu by laying out the menu items as buttons in a stack window, then setting the <b>menuName</b> <glossary tag="property">property</glossary> of a <keyword tag="button">button</keyword> in another <object tag="stack">stack</object> to the menu stack's name. Clicking the <keyword tag="button">button</keyword> displays the menu stack as a <keyword tag="menu">menu</keyword>. If you use the same <glossary tag="stack menu">stack menu</glossary> as the <property tag="menuName">menuName</property> of more than one <keyword tag="button">button</keyword>, the <b>menuButton</b> tells you which button the user clicked to display the <glossary tag="stack menu">stack menu</glossary>.</p><p/><p>For example, suppose you create a stack menu listing all your mailboxes, and display it when clicking both a "Delete" button and an "Open" button. Checking the <b>menuButton</b> from within the <glossary tag="stack menu">stack menu</glossary> lets you respond appropriately to the user's choosing a mailbox, either deleting it or opening it.</p>
  </description>
</doc>