Inserts a new menu item before the specified item in this menu The specified item can be represented as either text or ID and could refer to either a sub menu or a menu item Note that menu IDs are considered temporary and are only valid for a given interactive session, and thus should not be stored in model files or similar.
beforeItem | string or long | menu item before which new item is to be placed |
itemText | string | text of new item |
command | string | command to execute when menu item selected |
helpString | optional string | help string to be displayed in status bar when cursor hovers over menu item |
sessionFile | optional boolean | Default true. Should commands appear in session file when item selected? |
Return value | integer | The automatically generated (and temporary) ID of the newly created menu item |
Back to Menu
Back to Overview