Components Crossplatform Mac & Win Server Client Old Deprecated Guides Examples Videos
New in version: 10.0 10.1 10.2 10.3 10.4 10.5 11.0 11.1 11.2 11.3 Statistic FMM Blog
Builds a new menu from a definition text with menu items.
|Menu||5.1||✅ Yes||✅ Yes||❌ No||❌ No||❌ No|
|Name||The title of the new menu.||"MainMenu"|
|Definition||The menu definition.||"Red;1¶Blue;2¶Yellow;3"|
Returns menu reference or error.
DescriptionBuilds a new menu from a definition text with menu items.
This function allows you to easily create a menu with a definition. The first two parameters are required. The "Name" parameter is the name of the menu.
The "Definition" parameter is a return-delimited list of menu items for this menu. Each line represents one item on the menu. You can specify a tag value for a menu item by appending a semi-colon and the value onto the end of the item name. For example, if you had "Blue;0000FF" on a line, your menu would have an item with the title "Blue" and when a user selected that item, the tag value "0000FF" could be used for your script. For sub-menus, specify the name of the sub-menu, followed by a greater-than sign (">") followed by the next sub-menu name or menu item. For example, if you had "Colors>Red" on a line, your menu would have a sub-menu named "Colors" with an item inside named "Red". Every sub-menu and menu item can be preceded with one or more special "meta tags" to specify different styles and marks for the sub-menu or item name as explained below:
|!||The item will appear disabled.|
|$||The item will require the shift key to be pressed in order to show up.|
|^||The item will require the control key to be pressed in order to show up.|
|~||The item will require the alt/option key to be pressed in order to show up. (this is the tilde character, which is shifted version of the key to the left of the 1 on English keyboards) (only available on Mac)|
|@||The item will require the command key to be pressed in order to show up. (only available on Mac)|
|#||The item will appear bold.|
|%||The item will appear italicized.|
|_||The item will appear underlined.|
|` or √||The item will appear with a check mark. (this is the backtick character, which is the key to the left of the 1 on English keyboards) (on Mac, you can also use opt-v to type an actual check mark)|
|* or •||The item will appear with a bullet mark. (On Mac, you can also use opt-8 to type an actual bullet mark)|
|+ or ◊||The item will appear with a diamond mark. (On Mac, you can also use shift-opt-v to type an actual diamond mark)|
|=||disable the meta tag processing for the rest of the sub-menu or item name.|
|-||The item is a separator.|
You can specify more than one of the above for any item to set multiple attributes at once, with the exception of the check mark, bullet mark, and diamond mark. You can only have one mark defined for a menu item. For example, if you had "!#%Delete Record" on a line, your menu would have an item with the name "Delete Record" that appeared disabled, bold, and italicized. If you need to display a menu item that starts with one of these "meta tags", you can use the equals ("=") meta tag to skip the meta tag processing for the item. For example, if you had "=$4.00" on a line, your menu would have an item with the name "$4.00" instead of a menu named "4.00" that required you to press the shift key in order to make the item visible.
Not all features available on Windows!
With 5.2 plugin the name of the menu also defines the identifier to use. You can leave name empty to use reference number provided by plugin.
Version 11.2 of MBS Plugin adds backslash as escape character.
Define a menu:
Define a menu with submenus:
Define a menu with checkmark:
Choose from menu with one Let statement:
- Version 11.2
- Added backslash as escape character for Menu.DefineQuickMenu function.
- Version 10.4
- Version 9.4
- Added new keys FontColor and BackColor elements to XML for Menu.DefineQuickMenuXML to define colors.
- MBS FileMaker Plugin, version 11.2pr8
- New in the MBS FileMaker Plugin 10.1
- MBS FileMaker Plugin IDs
- MBS FileMaker Plugin 6.3 for OS X/Windows
- MBS FileMaker Plugin, version 6.3pr3
- MBS FileMaker Plugin, version 5.2pr6
- MBS FileMaker Plugin 5.1 for OS X/Windows
- MBS FileMaker Plugin, version 5.1pr8
Created 11st May 2015, last changed 12nd May 2021
Feedback: Report problem or ask question.
MBS Xojo Plugins