.. highlightlang:: us .. index:: MnAppend .. _mnappend: MnAppend ======== .. us.tag MnAppend ENGLISH Menu :ref:`MnAppend` appends an empty menu to the main menu, or appends a new menu item to a pop-up menu. .. function:: bool = MnAppend(ssMenu, nCommandID, ssMenuString) bool = MnAppend(ssMenu, nCommandID, ssMenuString, nFlag) bool = MnAppend(ssMenu, nMenu, nCommandID, ssMenuString) bool = MnAppend(ssMenu, nMenu, nCommandID, ssMenuString, nFlag) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: ssMenu *ssMenu* is the name of the menu bar. The following menus are available: .. list-table:: :header-rows: 1 * - 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. .. uparam:: nMenu *nMenu* is the position of the menu. The entry that lies farthest left (normally the File Menu) has the position 1. .. uparam:: nCommandID *nCommandID* is the identification number of a menu item. A unique *nCommandID* can be created using the function :ref:`MnGetNewCommandID`. .. uparam:: ssMenuString Specifies the content of the new menu item. .. uparam:: nFlag *nFlag* is one of the following values: .. list-table:: :header-rows: 1 * - 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. .. us.example **Example** :: def Test() { MessageBox("Menu Test selected!"); } nID = MnGetNewCommandID(); MnAppend("Document", nID, "&Test"); MnDrawMenuBar(); MnSetCommand(nID, "test()"); .. seealso:: :ref:`overview-menus`, :ref:`MnInsert`, :ref:`MnDrawMenuBar`, :ref:`MnSetCommand` :sub:`id-1481876`