toolbar Parameter

Sets the contents of the tool-bar menu.

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

Scope: File

Syntax

query toolbar.Name 
set toolbar.Name [BITMAP resddl_id] [ HELP HelpText] [OrdinalNumber] [Command ] 

Options

Name 
Name for the item to be included on the new tool-bar menu. This name is also used as the text label on the new tool-bar menu item. To include a blank in the name, use the underscore character (_).
BITMAP 
Specifies that the new tool-bar item is a bitmap. If used, you must also specify:
resdll 
The resource dll containing the new item's bitmap.
id 
The id for the bitmap contained in the resdll resource dll.
HELP 
Optional hover-help text specified by HelpText, enclosed in quotes. When you pause the mouse cursor over your tool-bar item, this text will appear in a bubble near the mouse cursor.
OrdinalNumber 
The position at which the tool-bar item is inserted, starting at zero. If the number is greater than the first available position, or if no number is specified, the first available position is used.
Command 
The action or actions to perform when the tool-bar item is selected.

Description

The toolbar parameter sets the tool-bar menu by adding or removing user-defined items from the tool-bar. It can also remove default Editor window tool-bar items.

If only the name of an existing tool-bar item is given when setting the toolbar parameter, that item is deleted from the tool-bar menu.

When specifying the name of user-defined tool-bar items, Name is case-sensitive. You must enter the tool-bar item text name exactly as it appears. Where a space appears, substitute the underscore character ( _).

Default Editor window tool-bar items must be referred to by their reserved names, as listed below:

LP_NEW 
New
LP_OPENEDIT 
Open
LP_SAVE 
Save
LP_PRINT 
Print...
LP_UNDO 
Undo
LP_REDO 
Redo
LP_CLIPCUT 
Cut
LP_CLIPCOPY 
Copy
LP_CLIPPASTE 
Paste
LP_SELALL 
Select all
LP_DESELALL 
Deselect all
LP_FINDCHANGE 
Find
LP_COMPARE 
Compare
LP_RECSTART 
Start recording
LP_RECHALT 
Stop recording
LP_RECPLAY 
Playback recording
LP_FONTS 
Fonts
LP_TOKENS 
Colors
LP_RINGCONFIGURE 
Ring manager
LP_NEXTINRING 
Next in ring
LP_PREVINRING 
Previous in ring
LP_NEXTRING 
Next ring
LP_PREVRING 
Previous ring
LP_HELPINDEX 
Help index
LP_GENERALHELP 
General help
LP_USINGHELP 
Using help

Examples

  1. To remove the New tool-bar button from the tool-bar, type :
    set toolbar.LP_NEW
  2. To create a new text item on the tool-bar called Open, that when selected displays the open dialog, type:
    set toolbar.Open dialog open 
  3. To create this same item with help, and appearing after the second item already on the tool-bar, type:
    set toolbar.Open HELP "display the open dialog" 2 dialog open 
  4. You can use a bitmap icon in place of a text label for your tool-bar item. 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 create an iconic tool-bar item with the same function as Example 1, type:

    set toolbar.Open BITMAP evfwrc21_2 dialog open 

API Return Code

-1 
The option specified for the bitmap was not valid.

toolbarlist Parameter
toolshow Parameter