<doc>
  <legacy_id>1108</legacy_id>
  <name>enable menu</name>
  <type>command</type>
  <syntax>
    <example>enable [menuItem <i>itemNumber</i> of] menu {<i>menuName</i> | <i>menuNumber</i>}</example>
    <example>enable menuItem <i>itemNumber</i> of <i>button</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Menus</category>
  </classification>
  <references>
    <property tag="disabled">disabled Property</property>
    <command tag="doMenu">doMenu Command</command>
    <command tag="enable">enable Command</command>
    <property tag="enabled">enabled Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Enables a <keyword tag="menu">menu</keyword> or <glossary tag="menu item">menu item</glossary> so that it can be chosen by the user.</summary>
  <examples>
    <example>enable menu 2</example>
    <example>enable menuItem 3 of menu "Text" <code><i>-- menu in menu bar</i></code></example>
    <example>enable menuItem 4 of button "Edit"</example>
  </examples>
  <description>
    <p>Use the <b>enable menu</b> <glossary tag="command">command</glossary> to enable a <keyword tag="menu">menu</keyword> or <glossary tag="menu item">menu item</glossary> so it can be chosen.</p><p/><p><b>Parameters:</b></p><p>The <i>itemNumber</i> is the number of a <glossary tag="menu item">menu item</glossary>, from top to bottom of the <keyword tag="menu">menu</keyword>. The first <glossary tag="menu item">menu item</glossary> is numbered 1. (Horizontal lines count.)</p><p/><p>The <i>menuName</i> is the name of a <keyword tag="menu">menu</keyword> in the current <glossary tag="menu bar">menu bar</glossary>.</p><p/><p>The <i>menuNumber</i> is the number of a <keyword tag="menu">menu</keyword>, from left to right.</p><p/><p>The <i>button</i> is any button.</p><p/><p><b>Comments:</b></p><p>If a <i>menuItem</i> is specified, only that <glossary tag="menu item">menu item</glossary> is enabled; otherwise, the entire <keyword tag="menu">menu</keyword> is enabled.</p><p/><p>When used to enable an entire menu at once, the <b>enable menu</b> <glossary tag="command">command</glossary> applies only to <function tag="menus">menus</function> in the current <glossary tag="menu bar">menu bar</glossary>. To disable a <keyword tag="menu">menu</keyword> associated with a <keyword tag="button">button</keyword>, use the <command tag="enable">enable</command> <glossary tag="command">command</glossary>.</p><p/><p>On Mac OS systems, the Apple menu does not have a number and cannot be enabled or disabled. Menu numbering starts with the menu to the right of the Apple menu.</p><p/><p>Since a LiveCode menu bar is implemented as a group of buttons (one button per menu, with the menu items as lines in the button's <b>text</b> <glossary tag="property">property</glossary>), you can indicate a <keyword tag="menu">menu</keyword> by specifying its <keyword tag="button">button</keyword>. <property tag="disabled">Disabled</property> <glossary tag="menu item">menu items</glossary> have an open parenthesis<code> ( </code>at the beginning of the line for that menu item. When used to <command tag="enable">enable</command> a <glossary tag="menu item">menu item</glossary>, the <b>enable menu</b> <glossary tag="command">command</glossary> removes the open parenthesis from the beginning of the specified line.</p>
  </description>
</doc>