<doc>
  <legacy_id>1761</legacy_id>
  <name>option</name>
  <type>command</type>
  <syntax>
    <example>option <i>stack</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Menus</category>
  </classification>
  <references>
    <command tag="pulldown">pulldown Command</command>
    <function tag="menuButton">menuButton Function</function>
    <property tag="menuName">menuName Property</property>
    <property tag="menuLines">menuLines Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Displays an option menu whose <glossary tag="menu item">menu items</glossary> are <glossary tag="button">buttons</glossary> in a <object tag="stack">stack</object>.</summary>
  <examples>
    <example>option stack "Hot Text Items"</example>
    <example>option stack (the menuStack of this image) <code><i>-- custom property</i></code></example>
  </examples>
  <description>
    <p>Use the <b>option</b> <glossary tag="command">command</glossary> to display a <glossary tag="stack menu">stack menu</glossary> as an option menu in situations where it is not possible to attach the <keyword tag="menu">menu</keyword> to a <keyword tag="button">button</keyword> (for example, if the contents of the <keyword tag="menu">menu</keyword> are not known in advance).</p><p/><p><b>Parameters:</b></p><p>The <i>stack</i> is any <href tag="reference/object_reference.rev">stack reference</href>. The <glossary tag="stack">stack's</glossary> first <keyword tag="card">card</keyword> must contain a <keyword tag="button">button</keyword> for each <glossary tag="menu item">menu item</glossary> in the option menu.</p><p/><p><b>Comments:</b></p><p>Use the <b>option</b> <glossary tag="command">command</glossary> in a <message tag="mouseDown">mouseDown</message> <glossary tag="handler">handler</glossary> to display the <keyword tag="menu">menu</keyword>:</p><p/><p><code>  on mouseDown</code></p><p><code>    option stack "Help Menu"</code></p><p><code>  end mouseDown</code></p><p/><p>While the menu is displayed, the handler pauses.</p><p/><p>The menu appears centered over the center of the control containing the handler. Choosing a menu item from the menu sends a <b>mouseUp</b> <keyword tag="message box">message</keyword> to the <i>stack</i>.</p>
  </description>
</doc>