MenuItems Property


set the menuItems of [menu
<submenu_name> of] menu <menu_name> to <list> Applies to menus


The menuItems property determines the items in a user-defined menu or submenu. The menuItems property is a list of item names separated by carriage returns. The default value is an empty character string. Each item can contain up to 31 characters. The following list summarizes the special characters that can be used when adding a menu item: Character: ( Meaning: Item created disabled Example: "(Next" Character: / Meaning: Accelerator key to follow Example: "Delete/D" Character: & Meaning: Character key equivalent to follow (MS-Windows only) Example: "&Previous" or "Pr&evious" Character: ; Meaning: Multiple items created Example: "First;Last;Recent"


You cannot retrieve the items in a menu or submenu using the menuItems property. You can add duplicate entries to a menu, but only the first entry can be affected by other scripting commands such as enable and disable.


Place the following handler in the script of a stack. on openStack create menu "Presidents" put "Washington" into the_items put return&"Lincoln/L" after the_items put return&"&Kennedy" after the_items put return&"(Nixon" after the_items put return&"Clinton" after the_items set the menuItems of menu "Presidents" to the_items end openStack Close the stack and then reopen it. You should see a new menu, "Presidents", with the following menu items: "Washington", "Lincoln" (with accelerator key "L"), "Kennedy" (with character equivalent "K"), "Nixon" (disabled), and "Clinton".
This text has been mechanically extracted from the Oracle Media Objects MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.