<doc>
	<legacy_id>1678</legacy_id>
	<name>disable menu</name>
	<type>command</type>

	<syntax>
		<example>disable [menuItem <i>itemNumber</i> of] menu {<i>menuName</i> | <i>menuNumber</i>}</example>
		<example>disable menuItem <i>itemNumber</i> of <i>button</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Dims a <keyword tag="menu">menu</keyword> or <glossary tag="menu item">menu item</glossary> so that it no longer responds to user actions.</summary>

	<examples>
<example>disable menu 1</example>
<example>disable menu "Object"</example>
<example><p>disable menuItem 2 of menu "Styles"</p></example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Menus</category>
	</classification>

	<references>
		<command tag="disable">disable Command</command>
	</references>

	<description>Use the <b>disable menu</b> <glossary tag="command">command</glossary> to dim a <keyword tag="menu">menu</keyword> or <glossary tag="menu item">menu item</glossary> in the <glossary tag="menu bar">menu bar</glossary>, preventing the <glossary tag="menu item">menu item</glossary> from being 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><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><p>The <i>menuNumber</i> is the number of a <keyword tag="menu">menu</keyword>, from left to right.</p><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 disabled; otherwise, the entire <keyword tag="menu">menu</keyword> is disabled. The <b>disable menu</b> <glossary tag="command">command</glossary> inserts an open parenthesis ( before the menu item's name; you can also manually disable a <glossary tag="menu item">menu item</glossary> by <glossary tag="prepend">prepending</glossary> an open parenthesis to its name.</p><p></p><p>When used to disable an entire menu at once, the <b>disable 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="disable">disable</command> <glossary tag="command">command</glossary>.</p><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><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 ( before the name of that menu item, so when used to <command tag="disable">disable</command> a <glossary tag="menu item">menu item</glossary>, the <b>disable menu</b> <glossary tag="command">command</glossary> adds an open parenthesis at the beginning of the specified line.</p><p></p><p>Example of disabling a sub menu item using an open parenthesis:</p><p></p><p>Main1</p><p>  Sub1</p><p>  (Sub2</p><p>  Sub3</p><p>Main2</p><p>Main3</p><p></p><p>The menu item "Sub2" will be disabled.</p></description>
</doc>