<doc>
  <legacy_id>1489</legacy_id>
  <name>menuHistory</name>
  <type>property</type>
  <syntax>
    <example>set the menuHistory of <i>button</i> to <i>itemNumber</i></example>
  </syntax>
  <library></library>
  <objects>
    <button/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Menus</category>
  </classification>
  <references>
    <command tag="pulldown">pulldown Command</command>
    <function tag="menuButton">menuButton Function</function>
    <function tag="selectedText">selectedText Function</function>
    <property tag="label">label Property</property>
    <property tag="menuName">menuName 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 the number of the currently <property tag="selected">selected</property> item of the <keyword tag="menu">menu</keyword> that belongs to a <keyword tag="button">button</keyword>.</summary>
  <examples>
    <example>set the menuHistory of button "Tabs" to 1</example>
  </examples>
  <description>
    <p>Use the <b>menuHistory</b> <glossary tag="property">property</glossary> to change the selected item in a <keyword tag="menu">menu</keyword>, or to find out which <glossary tag="menu item">menu item</glossary> is currently selected.</p><p/><p><b>Value:</b></p><p>The <b>menuHistory</b> of a <keyword tag="button">button</keyword> is an <keyword tag="integer">integer</keyword> between 1 and the number of <glossary tag="menu item">menu items</glossary> in the <keyword tag="menu">menu</keyword>.</p><p/><p>By default, the <b>menuHistory</b> <glossary tag="property">property</glossary> of newly created <glossary tag="button">buttons</glossary> is set to 1.</p><p/><p><b>Comments:</b></p><p>When you set the <b>menuHistory</b> <glossary tag="property">property</glossary>, a <message tag="menuPick">menuPick</message> <keyword tag="message box">message</keyword> is sent to the <keyword tag="button">button</keyword>.</p><p/><p>If the button's <b>menuMode</b> is "comboBox", setting its <b>menuHistory</b> also changes the <glossary tag="button">button's</glossary> <property tag="label">label</property> to the new <glossary tag="menu item">menu item</glossary>.</p><p/><p>If the button's <b>menuMode</b> is "tabbed", setting its <b>menuHistory</b> also changes the active tab.</p><p/><p>If the button's <b>menuMode</b> is "option", setting its <b>menuHistory</b> changes the <property tag="label">label</property>. It also determines which <glossary tag="menu item">menu item</glossary> is under the <glossary tag="mouse pointer">mouse pointer</glossary> when the <keyword tag="menu">menu</keyword> next appears. Make sure to set the <b>menuHistory</b> <glossary tag="property">property</glossary> of an option menu whenever you change the current choice, so that the choice is under the <glossary tag="mouse pointer">mouse pointer</glossary> when the user clicks the menu.</p><p/><p><code/><b>Note:</b><code/> The effect of the <b>menuHistory</b> <glossary tag="property">property</glossary> in <glossary tag="cascading menu">cascading menus</glossary> is ambiguous. Avoid setting or relying on the <b>menuHistory</b> of a <glossary tag="cascading menu">cascading menu</glossary>.</p>
  </description>
</doc>