Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Menu.DefineQuickMenuXML
Defines a menu based on a xml description.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Menu | 5.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
XML | The description XML. |
Result
Returns menu reference or error.
Description
Defines a menu based on a xml description.The xml has a root entry called "menu". Each menu entry can have attributes title, tag, groupID, scriptname, filename and modifierkeys. A menu can have subnodes of name menu or item. The item can have attributes title, tag, scriptname, filename, tag, enabled, selectable, Separator, mark, style, GroupID or modifierkeys.
ModifierKeys can include shift, control, option or command.
Mark can include mixed, bullet, diamond or checked.
Style can include bold, italic or underline.
If an item has name "-" or Separator=1 attribute, the plugin will mark it as being a separator.
If the root menu entry has a name, we can use that name as menu reference.
Added FontColor and BackColor in version 9.4.
Added FontName and FontSize in version 13.0 to control the font for a menu item.
Examples
Defines a quick menu with XML:
MBS( "Menu.DefineQuickMenuXML"; "<menu name=\"menue\">
<menuitem name=\"Red\" value=\"1\" />
<menuitem name=\"Blue\" value=\"2\" />
<menuitem name=\"Yellow\" value=\"3\" />
</menu>" )
Define a menu with submenus:
MBS( "Menu.DefineQuickMenuXML"; "<menu name=\"menue\">
<submenu name=\"Warm Colors\">
<menuitem name=\"Red\" value=\"1\" />
<menuitem name=\"Blue\" value=\"2\" />
<menuitem name=\"Yellow\" value=\"3\" />
</submenu>
<submenu name=\"Cool Colors\">
<menuitem name=\"Blue\" value=\"4\" />
<menuitem name=\"Green\" value=\"5\" />
<menuitem name=\"Purple\" value=\"6\" />
</submenu>
</menu>\")" )
See also
Release notes
- Version 13.0
- Added fontname and fontsize as keys for the XML for Menu.DefineQuickMenuXML function. Now works for submenus, too.
- Version 10.4
- Improved text encoding handling for XML Parsing in XML functions, Menu.DefineQuickMenuXML and Clipboard functions.
- Version 9.4
- Added new keys FontColor and BackColor elements to XML for Menu.DefineQuickMenuXML to define colors.
Example Databases
Blog Entries
- Neues MBS Plugin 13.0 für Claris FileMaker
- MBS Plugin 13.0 for Claris FileMaker
- MBS FileMaker Plugin, version 13.0pr7
- MBS FileMaker Plugin, version 13.0pr6
- MBS FileMaker Plugin, version 10.4pr9
- MBS FileMaker Plugin, version 9.4pr1
- MBS FileMaker Plugin, version 5.2pr3
- MBS FileMaker Plugin, version 5.2pr2
This function checks for a license.
Created 6th June 2015, last changed 6th January 2023