Technical data

add button
CR-20 ModelSim Commands ModelSim EE/SE Command Reference
add button
The add button command adds a user-defined button to the Main window button
bar. New buttons are added to the right end of the bar. You can also add buttons
with a ModelSim tool: "The Button Adder"
(10-265).
Returns the path name of the button widget created.
Syntax
add button
<Text> <Cmd> [Disable | NoDisable] [{option value ...}]
Arguments
<Text>
The label to appear on the face of the button. Required.
<Cmd>
The command to be executed when the button is clicked 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
(CR-157). Transcribe will also
echo the results to the transcript window. Required.
Disable | NoDisable
If Disable, the button will be grayed-out during a run and not active. If NoDisable,
the button will continue to be active during a run. Optional. The default is Disable.
Note: The transcribe command (CR-157) will not work when the simulator is running, therefore dont use
transcribe with NoDisable.
{option value ...}
A list of option-value pairs that will be applied to the button widget. Optional. Any
properties belonging to Tk button widgets may be set. Useful options are
foreground color (-fg), background color (-bg), width (-width) and relief (-relief).
For a complete list of available options, use the configure command addressed to
the newly-created widget. For example:
.controls.button_7 config