Of course you probably don’t want a menu item named Procedure_A. To rename a menu item, simply rename the associated procedure. The Action menu will be updated the next time you look at it.
Each time you add a new procedure, it automatically appears at the bottom of the Action menu.
The menu items appear in the same order that procedures are listed in the View Menu (of course you can’t normally see both menus at the same time like this).
To rearrange the menu items, simply open the View Organizer and drag to rearrange the procedures.
The following sections describe variations from the basic one-size-fits-all Action menu. You can give the Action menu a different name, or even split the Action menu into multiple menus. You can also exempt some procedures so that they are not listed in the Action menu (a procedure that is not listed can only be triggered some other way, for example by a button). Many of these options are set up using the inspector panel in the Procedure Editor.
The Action menu does have some significant limitations. The Action menu can only add to the standard menus, you cannot replace the standard menus. The Action menu cannot have any submenus. The Action menu cannot change when the user switches from form to form—it always contains the same items (unless you switch to a different database). In addition, there must be a separate procedure for each menu item in the Action menu. It is not possible to have multiple menu items handled by a single procedure. With these restrictions in mind, the Action menu is by far the easiest way to set up your own menus in a Panorama database. (However, these restrictions don’t apply if you use Panorama’s more powerful Custom Menus system, which gives you complete control of the entire menu bar.)
Check this option in the inspector panel to disable a menu item. The item will still be in the menu, but it can’t be used.
Of course you probably wouldn’t bother to include a menu item that is permanently disabled. However, you can also turn this option (or any other) on and off in program code. This example disables the menu item for destroying the universe:
setprocedureoptions "","Destroy Universe","MENUDISABLED","Yes"
If you want to completely exclude a procedure from the action menu, check the Exclude from Action Menu option in the inspector panel. For example, you might do this if the procedure is now obsolete but you don’t want to delete it yet. Or the procedure might be triggered some other way, for example it could be called as a subroutine from another procedure, or from a graphics object.
Any procedure with a name that starts with a period is always excluded from the Action menu, whether or not the Exclude from Action Menu option is checked. For example, none of these procedures would appear in the menu.
.Initialize .SecretStuff .ModifyRecord
You can set up a command key equivalent in the inspector panel for any item in the Action menu. In this example, Command-Shift-B is set up to trigger Procedure_A.
Keep in mind, however, that you cannot override the command key equivalents for Panorama’s standard menu items. For example, you can’t define Command-O as the command key equivalent for a procedure, because that is already used for Open Database. If you do set up a command key equivalent that conflicts with an existing standard menu item, it will simply be ignored. (You can change or remove the command key equivalents for standard menu items by setting up your own Custom Menus.
Many menus contain one or more gray lines separating different sections in the menu. To add a separator line to the Action menu, create a procedure with a name that start with
(-. To add a second separator line to the menu, create a procedure named
(--. The third separator line should be named
(---, the fourth
(----, etc. (Each procedure name must contain a different number of dashes because Panorama does not allow duplicate procedure names.) Here’s an example of an Action menu divided into several sections.
Using Leading ( in a Menu Item A leading
( normally indicates a separator line, but what if you wanted to include a leading
( in the menu item, for example a phone number? To make this work you must un-check the (… is a separator item option, as shown here:
To give the Action menu a different name, insert an empty procedure with a name that begins and ends with a parenthesis as the very first procedure in the database. For example, inserting a procedure named
(Orchestra) before the first procedure causes the Action menu to become the Orchestra menu. (Normally, of course, you cannot see both the View and Action menu at the same time.)
If your database contains lots of procedures you may want to split the Action menu into two or more separate menus. To split the Action menu into separate pieces, insert an empty procedure with a name that begins and ends with parentheses. For example, to start a new menu named People, add a new procedure named
(People). All of the procedures below this point will be listed in the People menu. The example below shows an action menu split into four different menus.
To keep an entire group of procedures out of the menu insert a procedure named
(). Any procedure below a procedure named
() will not appear in any menu.
Using Custom Menus, you can also disable the Action menu completely.
Setting the menu state to On in the inspector panel adds a check mark to the menu. Setting it to Mixed adds a hypen.
Menu items can be indented from 1 to 8 spaces.
Indenting a menu item doesn’t change the procedure name — there is no space in front of the procedure name. This means that you can change the indentation without worrying about changing any call statements that use the procedure as a subroutine.
Each menu item can have its own separate font, style and color.
|10.0||Updated||Carried over from Panorama 6.0, but options are now specified in inspector panel instead of embedded into the name.|