|mnu|| = ||"",|
|sub|| = ||"",|
|sep|| = ||"`n",|
|r|| = ||0||)|
Show menu from the text.
|MDef||Textual menu definition.|
|Mnu||Menu to show. Label with the same name as menu will be launched on item selection. “” means first menu will be shown (default)|
|Sub||Optional subroutine that will override default label (named by menu)|
|Sep||Optional separator char used for menu items in menu definition, by default new line|
Message describing error if it occurred or new line separated list of created menus. If return value is blank, ShowMenu just displayed menu already created in one of previous calls.
You must have in the code label with the same name as that given to the menu, otherwise ShowMenu returns “No Label” error (unless you used “sub” parameter in which case the same applies to that subroutine). There must be no white space between menu name and start of the line. Set each menu item on new line, use “-” to define separator.
To create submenu, use “item = [submenu]” notation where submenu must exist in the textual menu definition. Referencing any particular menu as submenu multiple times will work correctly, but circular references must be avoided. To make item checked, use “+” as first character of its name, to make it disabled use “*”. To associated user data use “=data” after the item. If text after = doesn’t contain valid submenu reference, it will be seen as user data. This also means that submenu items can contain data. To make menu definition more compact use something else then new line as item separator for instance “|” :
menu21 = menu21|menu22|menu23|menu24
You can then use this command to show the menu
ShowMenu(mDef, "", "", "|") ;use first menu found and | as item separator