Macro Reference — PopupMenu Object — Add Method (PopupMenu Object)

# Add Method (PopupMenu Object)

Adds a new item to the end of the menu.

##

### [JavaScript]

    popupmenu.Add( strText, id, flags );

### [VBScript]

    popupmenu.Add strText, id, flags

## Parameters

strText

Specifies text to display. If eeMenuSeparator is set in the flags parameter, an empty string must be specified.

id

Specifies the identifier of the new menu item. The Track Method uses this identifier as the return value. If eeMenuSeparator is set in the flags parameter, 0 must be specified.

flags

Specifies status of the item. The following flags can be specified.

eeMenuChecked | Places a check mark next to the menu item.
eeMenuGrayed | Disables the menu item and grays it so that it cannot be selected.
eeMenuSeparator | Draws a horizontal dividing line. This flag cannot be combined with others.

## Version

Supported on EmEditor Professional Version 5.00 or later.