Error getting tags :
error 404Error getting tags :
error 404 menuHistory | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
menuHistory
Basics
Expander triangle
Type
Property
Syntax
set the menuHistory of button to itemNumber
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Specifies the number of the currently selected item of the menu that belongs to a button.
Examples

set the menuHistory of button "Tabs" to 1

Additional Comments
Expander triangle

Use the menuHistory property to change the selected item in a menu, or to find out which menu item is currently selected.

Value:

The menuHistory of a button is an integer between 1 and the number of menu items in the menu.

By default, the menuHistory property of newly created buttons is set to 1.

Comments:

When you set the menuHistory property, a menuPick message is sent to the button.

If the button's menuMode is "comboBox", setting its menuHistory also changes the button's label to the new menu item.

If the button's menuMode is "tabbed", setting its menuHistory also changes the active tab.

If the button's menuMode is "option", setting its menuHistory changes the label. It also determines which menu item is under the mouse pointer when the menu next appears. Make sure to set the menuHistory property of an option menu whenever you change the current choice, so that the choice is under the mouse pointer when the user clicks the menu.

Note: The effect of the menuHistoryproperty in cascading menus is ambiguous. Avoid setting or relying on the menuHistory of a cascading menu.

User Comments
Expander triangle
User thumbnail
(hidden)
StarStarStarStarStar
Jan 7, 2009
When you set the menuHistory property of a menu button (any menuMode), a menuPick message is sent to the button ONLY if the button's menuHistory was changed by setting it. (3.5.0.770)
User thumbnail
edgore@shinra.com
StarStarStarStarStar
Jul 14, 2010
It's also possible to read the menuHistory of a tabbed button, which can be used to perform different actions based on the tab selected. For example:

switch the MenuHistory of button "foo"
case 1
--do one set of things
break
case 2
--do a different set of things
break
end switch