Error getting tags :
error 404Error getting tags :
error 404 menuPick | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
menuPick
Basics
Expander triangle
Type
Message
Syntax

menuPick chosenItem[|submenuName],previousTab

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Sent to a button when a menu item is chosen from the menu associated with that button.
Examples

on menuPick theItem -- in a pulldown menu
if theItem is "Close" then close the defaultStack
tn quitn quitn quitn quitn quitn quit
end menuPick

Additional Comments
Expander triangle

Handle the menuPick message to do something when the user chooses a menu item from a button menu, or chooses a tab in a tabbed button.

Parameters:

The chosenItem is the label of the menu item the user chose. If the menu item is part of a submenu, the menu item label is followed by a vertical bar (|) and the submenu's label.

The previousTab is the text of the menu item that was selected before the user chose a new menu item. This parameter is included only if the button's menuMode property is set to "tabbed".

Note: If the specification of a menu or submenu includes a tag, that tag will replace the menu label in the chosenItem parameter

Comments:

The menuPick message is sent when the user clicks a tab in a tabbed button, when the user chooses a menu item from the menu associated with a button, or when a button's menuHistory property is set by a handler.

The menuPick message is sent every time a menu item is chosen, even if the menu is a type that retains its state (such as an option menu) and the chosen menu item has not changed. (However, no menuPick message is sent when an already-chosen tab in a tabbed button is clicked, since no menu is displayed.)

To get the item number of the currently chosen menu item, use the menuHistory property.

Note: The & and / characters can be used in a pulldown menu to create special effects. To be shown (instead of creating these effects), either character can be doubled. (For example, placing the line "This && That" in a menu item results in the menu item being displayed as "This & That", with one ampersand.) When the user chooses a menu item with these special characters, the chosenItemparameter is the text that appears in the menu as displayed, not the text of that line of the menu button.

User Comments
Expander triangle
User thumbnail
(hidden)
StarStarStarStarStar
Jan 7, 2009
The menuPick message is sent when a button's menuHistory property is set by a handler ONLY IF the menuHistory value was changed by setting it. For example, if a menu button's menuHistory is 3 and a handler sets it to 3 again, no menuPick message is sent to the button. (3.5.0.770)