Component: Menu 
----------------

Functions to create menus and show them as popup menu.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [4.1](newinversion41.md "First functions introduced with version 4.1.") / [15.4](newinversion154.md "Newest functions in version 15.4.") | ✅ 98% | ✅ 85% | ❌ No | ❌ No | ❌ No |

  
| Item | Details |
|:--|:--|
| [Menu.AddItem](MenuAddItem.md)   Adds a menu item to the end of the menu. | Mac/Win   4.1 |
| [Menu.AddItems](MenuAddItems.md)   Adds a couple of menu items. | Mac/Win   4.1 |
| [Menu.CreateMenu](MenuCreateMenu.md)   Creates a menu. | Mac/Win   4.1 |
| [Menu.DefineQuickMenu](MenuDefineQuickMenu.md)   Builds a new menu from a definition text with menu items. | Mac/Win   5.1 |
| [Menu.DefineQuickMenuXML](MenuDefineQuickMenuXML.md)   Defines a menu based on a xml description. | Mac/Win   5.2 |
| [Menu.FindItemWithTag](MenuFindItemWithTag.md)   Finds a menu entry with given tag in a menu. | Mac/Win   5.1 |
| [Menu.FindItemWithTitle](MenuFindItemWithTitle.md)   Finds a menu entry with given title in a menu. | Mac/Win   5.1 |
| [Menu.GetAllowsContextMenuPlugIns](MenuGetAllowsContextMenuPlugIns.md)   Returns whether the popup menu allows appending of contextual menu plugin items. | Mac only   4.1 |
| [Menu.GetEvaluate](MenuGetEvaluate.md)   Queries expression to be run when menu is chosen. | Mac/Win   6.1 |
| [Menu.GetMinimumWidth](MenuGetMinimumWidth.md)   Returns the minimum width of the menu. | Mac only   4.1 |
| [Menu.GetScriptFileName](MenuGetScriptFileName.md)   Queries which file contains the script to be run if menu item is selected. | Mac/Win   4.1 |
| [Menu.GetScriptName](MenuGetScriptName.md)   Queries the script name of the script to be run if menu item is selected. | Mac/Win   4.1 |
| [Menu.GetShowsStateColumn](MenuGetShowsStateColumn.md)   Returns a Boolean value that indicates whether the receiver displays the state column. | Mac only   4.1 |
| [Menu.GetTag](MenuGetTag.md)   Queries the tag value of the menu. | Mac/Win   4.1 |
| [Menu.GetTitle](MenuGetTitle.md)   Queries the menu title. | Mac/Win   4.1 |
| [Menu.GetURL](MenuGetURL.md)   Queries URL to be triggered for menu action. | Mac/Win   6.5 |
| [Menu.InsertItem](MenuInsertItem.md)   Inserts a menu item into the receiver at a specific location. | Mac/Win   4.1 |
| [Menu.IsOpen](MenuIsOpen.md)   Returns 1 while a menu is open. | Mac/Win   15.4 |
| [Menu.ItemAtIndex](MenuItemAtIndex.md)   Queries the ID of the menu item with given index. | Mac/Win   5.0 |
| [Menu.Items](MenuItems.md)   Queries the list of IDs for the menu items. | Mac/Win   5.0 |
| [Menu.List](MenuList.md)   Queries list of all IDs for menu objects. | Mac/Win   10.1 |
| [Menu.NumberOfItems](MenuNumberOfItems.md)   Returns the number of menu items in the menu, including separator items. | Mac/Win   4.1 |
| [Menu.PopUp](MenuPopUp.md)   Pops up the menu at the specified location. | Mac/Win   4.1 |
| [Menu.Release](MenuRelease.md)   Releases the menu. | Mac/Win   4.1 |
| [Menu.ReleaseAll](MenuReleaseAll.md)   Releases all menus and menu items. | Mac/Win   4.1 |
| [Menu.RemoveAllItems](MenuRemoveAllItems.md)   Removes all the menu items in the receiver. | Mac/Win   4.1 |
| [Menu.RemoveItem](MenuRemoveItem.md)   Removes a menu item from the menu. | Mac/Win   4.1 |
| [Menu.RemoveItemAtIndex](MenuRemoveItemAtIndex.md)   Removes the menu item at a specified location in the menu. | Mac/Win   4.1 |
| [Menu.SelectedItem](MenuSelectedItem.md)   Returns the reference number of the selected menu item. | Mac/Win   4.1 |
| [Menu.SetAllowsContextMenuPlugIns](MenuSetAllowsContextMenuPlugIns.md)   Sets whether the popup menu allows appending of contextual menu plugin items. | Mac only   4.1 |
| [Menu.SetEvaluate](MenuSetEvaluate.md)   Sets expression to be run when menu is chosen. | Mac/Win   6.1 |
| [Menu.SetMinimumWidth](MenuSetMinimumWidth.md)   Set the minimum width of the menu. | Mac only   4.1 |
| [Menu.SetScriptAction](MenuSetScriptAction.md)   Sets which script is called if a menu item in this menu is selected. | Mac/Win   4.1 |
| [Menu.SetShowsStateColumn](MenuSetShowsStateColumn.md)   Sets whether the receiver displays the state column. | Mac only   4.1 |
| [Menu.SetTag](MenuSetTag.md)   Sets the tag of the menu. | Mac/Win   4.1 |
| [Menu.SetTitle](MenuSetTitle.md)   Sets the menu title. | Mac/Win   4.1 |
| [Menu.SetURL](MenuSetURL.md)   Sets the URL to query when menu is used. | Mac/Win   6.5 |
| [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)   Creates a new menu item. | Mac/Win   4.1 |
| [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)   Creates a new separator menu item. | Mac/Win   4.1 |
| [MenuItem.GetAlternate](MenuItemGetAlternate.md)   Returns a Boolean value that indicates whether the receiver is an alternate to the previous menu item. | Mac only   4.1 |
| [MenuItem.GetAttributedTitle](MenuItemGetAttributedTitle.md)   Queries the title with styles. | Mac only   4.1 |
| [MenuItem.GetBackColor](MenuItemGetBackColor.md)   Queries background color for menu item. | Win only   6.5 |
| [MenuItem.GetBold](MenuItemGetBold.md)   Queries if menu item should use bold font style. | Mac/Win   5.1 |
| [MenuItem.GetEnabled](MenuItemGetEnabled.md)   Returns a Boolean value that indicates whether the receiver is enabled. | Mac/Win   4.1 |
| [MenuItem.GetEvaluate](MenuItemGetEvaluate.md)   Queries expression to be run when MenuItem is chosen. | Mac/Win   6.1 |
| [MenuItem.GetFontColor](MenuItemGetFontColor.md)   Queries font color for menu item. | Mac/Win   6.5 |
| [MenuItem.GetFontName](MenuItemGetFontName.md)   Queries font name to use. | Mac/Win   5.1 |
| [MenuItem.GetFontSize](MenuItemGetFontSize.md)   Queries font size to use for menu item. | Mac/Win   5.1 |
| [MenuItem.GetGroupID](MenuItemGetGroupID.md)   Queries the group id of the menu item. | Mac/Win   5.2 |
| [MenuItem.GetHidden](MenuItemGetHidden.md)   Returns a Boolean value that indicates whether the menu item is hidden. | Mac/Win   4.1 |
| [MenuItem.GetImage](MenuItemGetImage.md)   Queries the image for this menu item. | Mac/Win   4.1 |
| [MenuItem.GetItalic](MenuItemGetItalic.md)   Queries if menu item should use italic font style. | Mac/Win   5.1 |
| [MenuItem.GetKeyEquivalent](MenuItemGetKeyEquivalent.md)   Returns the menuitem's unmodified keyboard equivalent. | Mac only   4.1 |
| [MenuItem.GetKeyEquivalentModifierMask](MenuItemGetKeyEquivalentModifierMask.md)   Returns the receiver's keyboard equivalent modifier mask. | Mac only   4.1 |
| [MenuItem.GetMixedStateImage](MenuItemGetMixedStateImage.md)   Returns the image used to depict a mixed state. | Mac/Win   4.1 |
| [MenuItem.GetOffStateImage](MenuItemGetOffStateImage.md)   Returns the image used to depict the receiver's off state. | Mac/Win   4.1 |
| [MenuItem.GetOnStateImage](MenuItemGetOnStateImage.md)   Returns the image used to depict the receiver's on state. | Mac/Win   4.1 |
| [MenuItem.GetParentItem](MenuItemGetParentItem.md)   Returns the menu item whose submenu contains the menu item. | Mac/Win   4.1 |
| [MenuItem.GetParentMenu](MenuItemGetParentMenu.md)   Returns the menu containing the menu item. | Mac/Win   4.3 |
| [MenuItem.GetPath](MenuItemGetPath.md)   Queries path of a menu item in a menu hierarchy. | Mac/Win   5.2 |
| [MenuItem.GetRequireCommand](MenuItemGetRequireCommand.md)   Queries if this menu item only shows if command key is pressed. | Mac/Win   5.1 |
| [MenuItem.GetRequireControl](MenuItemGetRequireControl.md)   Queries if this menu item only shows if control key is pressed. | Mac/Win   5.1 |
| [MenuItem.GetRequireOption](MenuItemGetRequireOption.md)   Queries if this menu item only shows if option/alt key is pressed. | Mac/Win   5.1 |
| [MenuItem.GetRequireShift](MenuItemGetRequireShift.md)   Queries if this menu item only shows if shift key is pressed. | Mac/Win   5.1 |
| [MenuItem.GetScriptFileName](MenuItemGetScriptFileName.md)   Queries which file contains the script to be run if menu item is selected. | Mac/Win   4.1 |
| [MenuItem.GetScriptName](MenuItemGetScriptName.md)   Queries the script name of the script to be run if menu item is selected. | Mac/Win   4.1 |
| [MenuItem.GetSelectable](MenuItemGetSelectable.md)  **Deprecated**    Queries whether menu item is selectable. | Mac/Win   6.3 |
| [MenuItem.GetState](MenuItemGetState.md)   Returns the state of the menu item. | Mac/Win   4.1 |
| [MenuItem.GetStrikeOut](MenuItemGetStrikeOut.md)   Queries strikeout setting for menu item. | Mac/Win   6.5 |
| [MenuItem.GetSubMenu](MenuItemGetSubMenu.md)   Returns the submenu associated with the receiving menu item. | Mac/Win   4.1 |
| [MenuItem.GetTag](MenuItemGetTag.md)   Queries the tag value of the menu. | Mac/Win   4.1 |
| [MenuItem.GetTitle](MenuItemGetTitle.md)   Queries title of menu item. | Mac/Win   4.1 |
| [MenuItem.GetToolTip](MenuItemGetToolTip.md)   Returns the help tag for a menu item. | Mac only   4.1 |
| [MenuItem.GetURL](MenuItemGetURL.md)   Queries URL to be triggered for menu item action. | Mac/Win   6.5 |
| [MenuItem.GetUnderline](MenuItemGetUnderline.md)   Queries if menu item should use underline font style. | Mac/Win   5.1 |
| [MenuItem.GetUserKeyEquivalent](MenuItemGetUserKeyEquivalent.md)   Returns the user-assigned key equivalent for the menu item. | Mac only   4.1 |
| [MenuItem.HasSubmenu](MenuItemHasSubmenu.md)   Returns a Boolean value that indicates whether the receiver has a submenu. | Mac/Win   4.1 |
| [MenuItem.IsSeparatorItem](MenuItemIsSeparatorItem.md)   Returns a Boolean value that indicates whether the receiver is a separator item. | Mac/Win   4.1 |
| [MenuItem.List](MenuItemList.md)   Queries list of all IDs for menu item objects. | Mac/Win   10.1 |
| [MenuItem.Release](MenuItemRelease.md)   Releases the menu item. | Mac/Win   4.1 |
| [MenuItem.ReleaseAll](MenuItemReleaseAll.md)   Frees all menus and menu items. | Mac/Win   10.5 |
| [MenuItem.SetAlternate](MenuItemSetAlternate.md)   Marks the receiver as an alternate to the previous menu item. | Mac only   4.1 |
| [MenuItem.SetAttributedTitle](MenuItemSetAttributedTitle.md)   Applies a formatted text to the menu item. | Mac only   4.1 |
| [MenuItem.SetBackColor](MenuItemSetBackColor.md)   Sets the back color of the menu item. | Win only   6.5 |
| [MenuItem.SetBold](MenuItemSetBold.md)   Sets menu item to use bold font style. | Mac/Win   5.1 |
| [MenuItem.SetEnabled](MenuItemSetEnabled.md)   Sets whether the menu item is enabled. | Mac/Win   4.1 |
| [MenuItem.SetEvaluate](MenuItemSetEvaluate.md)   Sets expression to be run when menu item is chosen. | Mac/Win   6.1 |
| [MenuItem.SetFontColor](MenuItemSetFontColor.md)   Sets the font color to use. | Mac/Win   6.5 |
| [MenuItem.SetFontName](MenuItemSetFontName.md)   Sets the font name to use. | Mac/Win   5.1 |
| [MenuItem.SetFontSize](MenuItemSetFontSize.md)   Sets the font size to use. | Mac/Win   5.1 |
| [MenuItem.SetGroupID](MenuItemSetGroupID.md)   Sets the group id of the menu item. | Mac/Win   5.2 |
| [MenuItem.SetHidden](MenuItemSetHidden.md)   Sets whether the menu item is hidden. | Mac/Win   4.1 |
| [MenuItem.SetImage](MenuItemSetImage.md)   Sets the menu item image. | Mac/Win   4.1 |
| [MenuItem.SetItalic](MenuItemSetItalic.md)   Sets menu item to use italic font style. | Mac/Win   5.1 |
| [MenuItem.SetKeyEquivalent](MenuItemSetKeyEquivalent.md)   Sets the receiver's unmodified key equivalent. | Mac only   4.1 |
| [MenuItem.SetKeyEquivalentModifierMask](MenuItemSetKeyEquivalentModifierMask.md)   Sets the menu items's keyboard equivalent modifiers. | Mac only   4.1 |
| [MenuItem.SetMixedStateImage](MenuItemSetMixedStateImage.md)   Sets the image of the receiver that indicates a "mixed" state, that is, a state neither "on" nor "off". | Mac/Win   4.1 |
| [MenuItem.SetOffStateImage](MenuItemSetOffStateImage.md)   Sets the image of the receiver that indicates an "off" state. | Mac/Win   4.1 |
| [MenuItem.SetOnStateImage](MenuItemSetOnStateImage.md)   Sets the image of the receiver that indicates an "on" state. | Mac/Win   4.1 |
| [MenuItem.SetRequireCommand](MenuItemSetRequireCommand.md)   Set to show menu item only if command key is pressed down. | Mac/Win   5.1 |
| [MenuItem.SetRequireControl](MenuItemSetRequireControl.md)   Set to show menu item only if control key is pressed down. | Mac/Win   5.1 |
| [MenuItem.SetRequireOption](MenuItemSetRequireOption.md)   Set to show menu item only if alt/option key is pressed down. | Mac/Win   5.1 |
| [MenuItem.SetRequireShift](MenuItemSetRequireShift.md)   Set to show menu item only if shift key is pressed down. | Mac/Win   5.1 |
| [MenuItem.SetScriptAction](MenuItemSetScriptAction.md)   Sets which script is called if a menu item in this menu is selected. | Mac/Win   4.1 |
| [MenuItem.SetSelectable](MenuItemSetSelectable.md)  **Deprecated**    Sets whether menu item is selectable. | Mac/Win   6.3 |
| [MenuItem.SetState](MenuItemSetState.md)   Sets the state of the menu item. | Mac/Win   4.1 |
| [MenuItem.SetStrikeOut](MenuItemSetStrikeOut.md)   Sets the strikeout value of the menu item. | Mac/Win   6.5 |
| [MenuItem.SetSubMenu](MenuItemSetSubMenu.md)   Sets the submenu of the menu item. | Mac/Win   4.1 |
| [MenuItem.SetTag](MenuItemSetTag.md)   Sets the tag of the menu. | Mac/Win   4.1 |
| [MenuItem.SetTitle](MenuItemSetTitle.md)   Sets the menuitem's title. | Mac/Win   4.1 |
| [MenuItem.SetToolTip](MenuItemSetToolTip.md)   Sets a help tag for a menu item. | Mac only   4.1 |
| [MenuItem.SetURL](MenuItemSetURL.md)   Sets the URL to query when menuitem is used. | Mac/Win   6.5 |
| [MenuItem.SetUnderline](MenuItemSetUnderline.md)   Sets menu item to use underline font style. | Mac/Win   5.1 |

113 functions shown.

These functions require a license (50%).

### Release notes

- **Version 15.4**
    - Added [Menu.IsOpen](https://www.mbsplugins.eu/MenuIsOpen.shtml) function.
- **Version 15.1**
    - Improved [Menu.PopUp](https://www.mbsplugins.eu/MenuPopUp.shtml) to report an error if the item for the positioning is not in the menu.
- **Version 13.0**
    - Added fontname and fontsize as keys for the XML for [Menu.DefineQuickMenuXML](https://www.mbsplugins.eu/MenuDefineQuickMenuXML.shtml) function. Now works for submenus, too.
    - Added recursive parameter to [Menu.FindItemWithTag](https://www.mbsplugins.eu/MenuFindItemWithTag.shtml) and [Menu.FindItemWithTitle](https://www.mbsplugins.eu/MenuFindItemWithTitle.shtml) functions.
- **Version 11.2**
    - Added backslash as escape character for [Menu.DefineQuickMenu](https://www.mbsplugins.eu/MenuDefineQuickMenu.shtml) function.
- **Version 10.4**
    - Improved text encoding handling for XML Parsing in [XML](https://www.mbsplugins.eu/component_XML.shtml) functions, [Menu.DefineQuickMenuXML](https://www.mbsplugins.eu/MenuDefineQuickMenuXML.shtml) and [Clipboard](https://www.mbsplugins.eu/component_Clipboard.shtml) functions.
- **Version 10.1**
    - Added [Menu.List](https://www.mbsplugins.eu/MenuList.shtml) and [MenuItem.List](https://www.mbsplugins.eu/MenuItemList.shtml) to list all IDs for menu entries.
- **Version 9.4**
    - Added new keys FontColor and BackColor elements to XML for [Menu.DefineQuickMenuXML](http://www.mbsplugins.eu/MenuDefineQuickMenuXML.shtml) to define colors.
- **Version 9.0**
    - Improved out of bounds error message for [Menu.InsertItem](http://www.mbsplugins.eu/MenuInsertItem.shtml), [Menu.RemoveItemAtIndex](http://www.mbsplugins.eu/MenuRemoveItemAtIndex.shtml), [Calendar.Item.GetAttendeeURL](http://www.mbsplugins.eu/CalendarItemGetAttendeeURL.shtml), [Calendar.Item.GetAttendeeCommonName](http://www.mbsplugins.eu/CalendarItemGetAttendeeCommonName.shtml), [Calendar.Item.GetAttendeeStatus](http://www.mbsplugins.eu/CalendarItemGetAttendeeStatus.shtml), [Printer.PrinterName](http://www.mbsplugins.eu/PrinterPrinterName.shtml) and [CLGeocoder.PlacemarkValue](http://www.mbsplugins.eu/CLGeocoderPlacemarkValue.shtml).
- **Version 8.3**
    - Added new modes content and object for [Menu.PopUp](http://www.mbsplugins.eu/MenuPopUp.shtml).
    - Fixed window mode for [Menu.PopUp](http://www.mbsplugins.eu/MenuPopUp.shtml) function.

### FileMaker Magazin

- [Ausgabe 2/2021, Seite 27 bis 30](https://filemaker-magazin.de/neuigkeit/4132-Appetithappen-FMM_202102)
- [Ausgabe 6/2020, Seite 25](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

### Example Databases

- [Mac and iOS/Data Detector](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Data%20Detector.shtml#2ScriptAnchor_)
- [Menu/DefineQuickMenu with XML](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/DefineQuickMenu%20with%20XML.shtml#1ScriptAnchor_)
- [Menu/DefineQuickMenu](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/DefineQuickMenu.shtml#1ScriptAnchor_)
- [Menu/Popup Menu](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/Popup%20Menu.shtml#1ScriptAnchor_)

[HTML Version](component_MenuItem.shtml)