Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Builds a new menu from a definition text with menu items.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Menu | 5.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example |
---|---|---|
Name | The title of the new menu. | "MainMenu" |
Definition | The menu definition. | "Red;1¶Blue;2¶Yellow;3" |
Returns menu reference or error.
! | 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. |
Define a menu:
MBS( "Menu.DefineQuickMenu"; "ColorsMenu" ; "Red;1¶Blue;2¶Yellow;3" )
Define a menu with submenus:
MBS( "Menu.DefineQuickMenu"; "ColorsMenu"; "Warm colors>Red¶Warm colors>Yellow¶Warm colors>Orange¶Cool colors>Blue¶Cool colors>Green¶Cool colors>Purple")
Define a menu with checkmark:
MBS( "Menu.DefineQuickMenu"; "Current Fruit"; "Banana;Cherry;`Grape;Orange" )
Choose from menu with one Let statement:
// show menu with one let statement
Let ( [
// some list of menu entries
valuelist = "xxx¶yyy¶zzz" ;
// create menu from definition
menu = MBS ( "Menu.DefineQuickmenu"; "x" ; valuelist ) ;
// show menu near mouse
result = MBS ( "Menu.PopUp" ; menu ; "mouse" ) ;
// query selected item number
item = IF ( result = 1 ; MBS("Menu.SelectedItem"; menu) ) ;
// query title for that item
title = IF ( Length ( item > 0 ) ; MBS ( "MenuItem.GetTitle" ; item ) ) ;
// release memory
r = MBS ( "Menu.Release"; menu ) ] ;
// return the selected title
title )
This function checks for a license.
Created 11st May 2015, last changed 12nd May 2021