MnAppend

MnAppend appends an empty menu to the main menu, or appends a new menu item to a pop-up menu.

bool = MnAppend(ssMenu, nCommandID, ssMenuString)
bool = MnAppend(ssMenu, nCommandID, ssMenuString, nFlag)
bool = MnAppend(ssMenu, nMenu, nCommandID, ssMenuString)
bool = MnAppend(ssMenu, nMenu, nCommandID, ssMenuString, nFlag)

Return Value

If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).

Parameters

ssMenu

ssMenu is the name of the menu bar. The following menus are available:

Value Meaning
“Editor” This menu appears when an editor is active.
“Document” This menu appears when a document with diagram pages is active.
“DocumentServer” This menu appears when the UniPlot document page is embedded in another application program (OLE).
“Command” This menu appears when the UniScript command window is active.
“Main” This menu appears when no MDI window is available in the UniPlot main window. This is normally the case after UniPlot has be started.
nMenu

nMenu is the position of the menu. The entry that lies farthest left (normally the File Menu) has the position 1.

nCommandID

nCommandID is the identification number of a menu item. A unique nCommandID can be created using the function MnGetNewCommandID.

ssMenuString

Specifies the content of the new menu item.

nFlag

nFlag is one of the following values:

Value Meaning
MF_SEPARATOR Draws a horizontal dividing line.
MF_MENUBARBREAK Places the item on a new line in static menus or in a new column in pop-up menus. The new pop-up menu column will be separated from the old column by a vertical dividing line.
MF_MENUBREAK Places the item on a new line in static menus or in a new column in pop-up menus. No dividing line is placed between the columns.

Example

def Test()
{
    MessageBox("Menu Test selected!");
}
nID = MnGetNewCommandID();
MnAppend("Document", nID, "&Test");
MnDrawMenuBar();
MnSetCommand(nID, "test()");

id-1481876