menuMode | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | button | ||||||
Summary | Determines the appearance and behavior of menus associated with a button. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux | ||||||
Platforms | desktop, server | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Property: menuLines, showBorder, menuName, menubar, borderWidth, lookAndFeel, titleWidth Message: openField, menuPick Keyword: file, button, text, popup Glossary: popup menu, stack menu, appearance, field, cascading menu, line, property, command, tabbed button, behavior, handle, palette, message, Mac OS, OS X, control, dialog box, menu bar, menu, point, menu item, card Function: menus, folders Command: pulldown, option, group, popup Object: stack, button | ||||||
Description | Use the menuMode property to specify the appearance and behavior of the menu associated with a button. Any button's contents can be viewed as a menu if the button's style property is set to "menu". The menuMode setting creates menus of different types from the button's contents. (You set the button's contents with the text property.) You can also associate a stack with the button, using the menuName property. In this case, the contents of the stack's first card are displayed as a menu.
Setting a button's menuMode to "pulldown" has the same result as creating the equivalent menu items (as buttons) in a stack, then using the pulldown command to display the stack as a menu. Note: On Mac OS and OS X systems, pulldown menus in a window are drawn by the standard operating system routines if the button's showBorder property is set to true and its borderWidth is not zero. Pulldown menus in the menu bar are always drawn by the operating system. Setting a button's menuMode to "popup" has the same result as creating the equivalent menu items (as buttons) in a stack, then using the popup command to display the stack as a menu. on menuPick newTab,oldTab -- sent when user clicks a tab lock screen -- hide the swap hide group oldTab show group newTab unlock screen end menuPick Note: If a button's menuMode is set to "comboBox", the button receives field messages. For example, when the user clicks in the editable field, an openField message is sent to the button. Regardless of the menuMode, a menuPick message is sent to the button when the user chooses a menu item from the menu. If the button's style property is not set to "menu", the setting of its menuMode property has no effect. | ||||||
Tags | menus |