actionbar parameter

Sets the contents of the Editor menu-bar and associated pull-down menu items.

Note: This parameter is valid only when issued in an Editor window.

Scope: File

Syntax

set actionbar.{Item|BITMAP_resdll_id}[.{Subitem|BITMAP_resdll_id}][...] [OrdinalNumber] [Command] 
query actionbar.{Item|BITMAP_resdll_id}[.{Subitem|BITMAP_resdll_id}][...] 

Options

Item 
Name of the menu item to be included on the menu-bar.

You can also use the following special characters:

_ 
Use the underscore to include a blank in the name.
~ 
Creates a mnemonic for the menu item.
\t 
Defines an accelerator for the menu item.
Subitem 
Name of the selection item to be added to the Item pull-down menu.

You can also use the special characters described in Item.

BITMAP 
Specifies that the menu or sub-menu item is a bitmap.
resdll
The resource dll containing the new item's bitmap.
id 
The id for the bitmap contained in the resdll resource dll.
OrdinalNumber 
The position at which the menu item is inserted, starting at zero. Separators are included in the count.
Command
The action or actions to perform when Subitem is selected.

Description

The actionbar parameter is used to add menu choices to the Editor menu-bar and its associated pull-down menus. You can create completely new pull-down menu sets, or you can add to the contents of existing pull-down menus.

Use text or icons to represent menu choices. If you use icons, the icons must be contained in a DLL file located in a directory path included in the PATH environment variable.

If Item, Subitem, or BITMAP does not already exist in the specified menu-bar or sub-menu, it is created.

If Item, Subitem, or BITMAP is an existing item, the following happens:

Examples

  1. To create a Example menu-bar item, which creates a sound when selected, type:
    set actionbar.Example alarm 
  2. To create a Example menu-bar item with a subitem called Sound, which creates a sound when selected, and mnemonics for both items, type:
    set actionbar.E~xample.~Sound alarm 

    The mnemonic for Example is x, and the mnemonic for Sound is s.

    Note: You cannot define menu items with the same name within a given menu set. Though Examples 1 and 2 appear to set up menu-bar items with the same base name, the mnemonic differentiates them. You could continue to set up more menu-bar items with the same base name as long as a different mnemonic was used for each item.

  3. To add an accelerator to the Sound subitem defined in the above example, type:
    set actionbar.E~xample.~Sound\tAlt+S alarm 

    The accelerator for Sound is Alt+S.

  4. You can use a bitmap in place of a text label for your menu item or subitem. Bitmaps must be defined in a DLL file located in a directory path included in your PATH environment variable. The following example uses the bitmap with resource id 2, found in the evfwrc21.dll file included with the Editor. To add this bitmap to the pull-down menu defined in Example 2, type:
    set actionbar.E~xample.BITMAP_evfwrc21_2 alarm 

    You can also use a bitmap as a menu item on the menu-bar.

  5. You can define subitems to subitems. For example, the following example adds a subitem called Add to the pull-down menu defined in Example 2. Selecting the Add pull-down menu item raises a cascaded menu, with menu items that add one, two, or three lines to your document.
    set actionbar.E~xample.~Add.One_line add 1 
    set actionbar.E~xample.~Add.Two_lines add 2 
    set actionbar.E~xample.~Add.Three_lines add 3 
  6. To set the accelerator for the Save menu item to F2, type:
    set accelerator.lp_save F2 

    For a list of predefined Editor names, see the menuactive parameter.

API Return Codes

-1 
The option specified for Item was not valid. Type the option exactly as it appears in the menu, including uppercase and lowercase letters.
-2 
The item, subitem, or bitmap name contains invalid characters, or you tried to define a new menu item without specifying a command.



action Parameter
actionbarid Parameter
actionbarlist Parameter
popupmenu Parameter
submenuinit Parameter