menu | |
Type | keyword |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Summary | Used with the decorations property to specify that a window displays a menu bar. When used as the style property of a button, specifies that the contents of the button is displayed as a menu. Also used to designate a menu by name or number. |
Introduced | 1.0 |
OS | mac, windows, linux |
Platforms | desktop, server |
Example |
|
Related | Property: style, properties, menuMode, decorations Message: menuPick Keyword: menu, button, minimize, text, maximize, menuItem Glossary: property, menu item, OS X, Windows, menu bar, keyword, expression, Mac OS, evaluate, Unix Function: menus Command: doMenu Object: button |
Description | Use the menu keyword to give a window a menu bar (on Unix and Windows systems). If a button's style is set to "menu", its menuMode property determines how the menu is displayed when the user clicks the button. You can use the menu keyword to refer to one of the buttons in the current menu bar. For example, if the first menu in the menu bar is called "File", the expression the name of menu 1 evaluates to "button " File"". (Remember that in LiveCode, menus are usually implemented as buttons: the button's style and menuMode properties control how it is displayed, and the button's text property is used as the list of menu items.) The syntax for menu item strings is:
Where <flags> may include:
The <accelerator> can be specified as one of:
In the <accelerator>, <modifiers> is either:
In this case no space between the sequence and keyname/char is required The following named keys are supported:
On Mac OS X, these keys will be replaced with the appropriate system standard glyph. A tag can be specified as a A tag will only be recognised following the Note: As Windows and Linux do not have the 'Command' modifier, on those platforms 'Command' is an synonym for 'Control'. To ensure cross-platform uniformity it is important that you use 'Command' in preference to 'Control' since 'Control' on Mac OS X is a less frequently used modifier. Cross-platform note: The menu decoration has no effect on Mac OS and OS X systems. On Windows systems, the menu decoration must be set along with the maximize or minimize decorations:you cannot use maximize or minimize without including menu. |
Tags | menus |