Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


add_menuitem

The add_menuitem command creates a menu item within the specified menu of the specified window. May be used within a submenu. Returns nothing.

Syntax

add_menuitem

<window_name> <menu_path> <Text> <Cmd> [<shortcut>]

Arguments

<window_name>

Tk path of the window containing the menu. Required.

<menu_path>

Name of the Tk menu widget plus submenu path. Required.

<Text>

Text to be displayed. Required.

<Cmd>

The command to be executed when the menu item is selected with the left mouse button. To echo the command and display the return value in the Main window, prefix the command with the transcribe command. Transcribe will also echo the results to the transcript window. Required.

<shortcut>

Number of the letter in the menu name that is to be used as the shortcut. Numbering starts with 0 (i.e., first letter = 0, second letter = 1, third letter = 2, etc.). Optional. Default is "1", which indicates no shortcut is to be used.

Examples

add_menuitem $wname user "Save Results As..." $my_save_cmd

See also

add_menu, add_menucb, add_separator, add_submenu, change_menu_cmd

The add_menuitem command is also used as part of the add_menu example.


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase