Error getting tags :
error 404Error getting tags :
error 404 menuMode | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
menuMode
Basics
Expander triangle
Type
Property
Syntax
set the menuMode of button to menuType
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Determines the appearance and behavior of menus associated with a button.
Examples

set the menuMode of button "Edit" to pulldown

Additional Comments
Expander triangle

Use the menuMode property to specify the appearance and behavior of the menu associated with a button.

Value:

The menuMode of a button is one of pullDown, cascade, popup, tabbed, comboBox, or option.

Comments:

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.

pulldown: Displays each line of the button's contents as a menu item in a normal pulldown menu. Use this menuMode for buttons that are grouped into a menubar.

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'sshowBorderproperty is set to true and its borderWidth is not zero. Pulldown menus in the menu bar are always drawn by the operating system.

cascade: Displays each line of the button's contents as a menu item in a hierarchical menu. (The button must be part of a stack menu.)

popup: Displays each line of the button's contents as a menu item in a popup menu. The menu appears at the point of the mouse click.

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.

tabbed: Displays the button's contents as a horizontal list of tabs, like the tabs on filefolders. Each line of the button's contents is the title of a tab. Usually, tabbed buttons are used for dialog boxes or palettes containing a different group of controls for each tab. You can handle the menuPickmessage to display the correct group when a tab is clicked:

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

comboBox: Displays the button's contents as a drop-down scrolling list, with an editable field at the top.

Note: If a button'smenuMode is set to "comboBox", the button receives fieldmessages. For example, when the user clicks in the editable field, an openFieldmessage is sent to the button.

option: Displays an option menu (when the lookAndFeelproperty is set to "Motif"), a drop-down list (when the lookAndFeelproperty is set to "Windows 95"), or a Mac-style popup menu (when the lookAndFeelproperty is set to "Appearance Manager" or "Macintosh"). Setting a button'smenuMode to option has the same result as creating the equivalent menu items (as buttons) in a stack, then using the optioncommand to display the stack as a menu.

Regardless of the menuType, 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.

User Comments
Expander triangle